Skip to content

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

Description

@johsi-k

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions