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

[Code style] Remove getters and publicize private props needed externally #72

Open
johsi-k opened this issue Aug 6, 2019 · 0 comments

Comments

@johsi-k
Copy link
Contributor

johsi-k commented Aug 6, 2019

Example: All the properties on SectionContext are marked private, but many are needed outside the class itself. It is perhaps more reasonable to make these properties public than have 'getters' whose sole function is to return their corresponding private properties.

Doing so cuts down on boilerplate and clarifies at a glance which properties are semantically private to the class. If indirection becomes necessary in the future, we can always fall back on the get() syntax without breaking call sites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant