Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup ast/* #54

Closed
lestrrat opened this issue Dec 10, 2019 · 0 comments
Closed

Cleanup ast/* #54

lestrrat opened this issue Dec 10, 2019 · 0 comments
Labels
question Further information is requested

Comments

@lestrrat
Copy link
Contributor

I want to cleanup ast/* . For one thing I want to work towards squeezing more performance out of the library, but for that I want to centralize object value assignment and allocation. I'd like to apply this to a wider area than ast/, but I'd like to start at ast/

For now, I'd like to disallow explicit instantiation of, and assignment to structs. i.e.

// disallow 
n := ast.Foo{Start: tk, Value: blah}
n.Start = ...
n.Value = ...
// enforce encapsulation
n := ast.Foo(tk, blah)
n.Start() // Get only
n.SetValue(...) // If mutation is required

Would you consider this type of change if I submit a PR?

@goccy goccy added the question Further information is requested label May 29, 2020
@goccy goccy closed this as completed Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants