TradeItIosTicketSDK2
TradeItIosTicketSDK2 copied to clipboard
Properties need review
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).
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.
I agree and will discuss this with @mitochondrion tomorrow