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

Made initialized protected for extensibility. #52

Merged
merged 1 commit into from
Jan 21, 2015

Conversation

guilhermeblanco
Copy link
Member

I'm working on making PersistentCollection extends AbstractLazyCollection and it is required to have access to initialized property. This PR allows that.

@stof
Copy link
Member

stof commented Jan 20, 2015

should it be protected, or should it have only a protected getter to ensure that mutating it is done only in initialize ?

@Ocramius
Copy link
Member

I'd rather have a getter here, so that we can refactor later on. This also allows composition rather than forcing direct inheritance.

Yes, I know it's an abstract type.

@beberlei
Copy link
Member

For performance reasons i prefer the protected variable instead of a getter tbh.

@guilhermeblanco
Copy link
Member Author

@Ocramius we already a getter isInitialized(). I'd require a setter.
PersistentCollection in ORM calls initialized around 10 times, which I'd prefer to have as protected instead of a method for performance reasons too.

guilhermeblanco added a commit that referenced this pull request Jan 21, 2015
Made initialized protected for extensibility.
@guilhermeblanco guilhermeblanco merged commit c63f2e6 into master Jan 21, 2015
@guilhermeblanco guilhermeblanco deleted the initialized-as-protected branch January 21, 2015 05:12
@Ocramius Ocramius added this to the 1.3.0 milestone Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants