Skip to content

Rename PFObject '_state' instance variable to '_pfinternal_state'. #35

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

Merged
merged 1 commit into from
Aug 17, 2015

Conversation

richardjrossiii
Copy link
Contributor

This is only a temporary workaround. We should go back and clean up, not only our uses of the '_pfinternal_state' ivar directly, but also discuss whether our auto property synthesis still makes sense to have as a feature.

This prevents conflicts with our automatic property synthesis that is done for registered subclasses.

@nlutsenko
Copy link
Contributor

This works, but I am slightly skeptical on usage of double-underscores, since it's reserved by Apple.
It doesn't interfere with this, but definetly is something to be aware of.

@richardjrossiii Can we have a test for this, pretty please?

@richardjrossiii
Copy link
Contributor Author

Will write test, and change from double underscore. Stay tuned...

@richardjrossiii richardjrossiii force-pushed the richardross.subclassing.state.name.fix branch from d965032 to b2ee1d2 Compare August 17, 2015 21:09
@richardjrossiii richardjrossiii changed the title Rename PFObject '_state' instance variable to '__state'. Rename PFObject '_state' instance variable to '__pfinternal_state'. Aug 17, 2015
@nlutsenko
Copy link
Contributor

Still using double underscores for __pfinternal, do you think it's required?
Probably we can simply use _pfinternal_state, I don't think anyone is likely to use snake-case as well as prefix with pfinternal :D

@richardjrossiii
Copy link
Contributor Author

We already reserve fields in parse starting with _, so no, I guess the double underscore isn't necessary. I don't have any strong feelings either way, especially considering this is just a short-term workaround.

Will go with your lead and use _pfinternal_state.

@richardjrossiii richardjrossiii force-pushed the richardross.subclassing.state.name.fix branch 2 times, most recently from 2274b9b to 64c8241 Compare August 17, 2015 21:24
@richardjrossiii richardjrossiii changed the title Rename PFObject '_state' instance variable to '__pfinternal_state'. Rename PFObject '_state' instance variable to '_pfinternal_state'. Aug 17, 2015
@nlutsenko
Copy link
Contributor

LGTM, ship at will after nit is fixed.

**This is only a temporary workaround**. We should go back and clean up, not only our uses of the '_pfinternal_state' ivar directly, but also discuss whether our auto property synthesis still makes sense to have as a feature.

This prevents conflicts with our automatic property synthesis that is done for registered subclasses.
@richardjrossiii richardjrossiii force-pushed the richardross.subclassing.state.name.fix branch from 64c8241 to 3e82083 Compare August 17, 2015 21:55
richardjrossiii added a commit that referenced this pull request Aug 17, 2015
…te.name.fix

Rename PFObject '_state' instance variable to '_pfinternal_state'.
@richardjrossiii richardjrossiii merged commit de176e5 into master Aug 17, 2015
@richardjrossiii richardjrossiii deleted the richardross.subclassing.state.name.fix branch August 17, 2015 23:04
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

Successfully merging this pull request may close these issues.

3 participants