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

Properties need review #67

Open
adamkaplan opened this issue Nov 9, 2016 · 2 comments
Open

Properties need review #67

adamkaplan opened this issue Nov 9, 2016 · 2 comments

Comments

@adamkaplan
Copy link
Contributor

Most properties are written as @property (nullable) Type *thing. This means that the default atomic keyword is implied. So, every property has a thread synchronization lock included. That’s a lot of unneeded overhead for a UI Framework where everything is expected to be used by a single thread.

Atomic properties are a farce anyway. If you are setting one property on thread A and another property on thread B, it’s almost guaranteed to create bugs as the property values can get out of sync. IMO is vastly preferable to state that the classes are explicitly not thread safe, unless you actually intend for them to be (which is a lot of work to do correctly).

@adamkaplan
Copy link
Contributor Author

Additionally, some classes like TradeItLinkedLogin use the nice initWith... model to set all properties. In this case the class should be immutable, otherwise there is not really any point to maintaining the initializer.

@jsom
Copy link
Contributor

jsom commented Nov 9, 2016

I agree and will discuss this with @mitochondrion tomorrow

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

2 participants