Just a quick question if I may, I have always (since learning obj-c) written int properties as follows…
@property(nonatomic, assign) int myValue;
I am now thinking that this might be overkill and I might as well write…
@property int myValue;
Just curious, I know that “assign” is the default behaviour and that “nonatomic” can be fractionally faster …
all the best
Gary
Well, the question of declaring atomicity is a separate one from whether you explicitly declare attributes that are the default. The former will depend on the nature of your code — is there likely to be contentious multithread access to the property?
Regarding the latter, it’s mostly a matter of style, but in general I think you should err on the side of explicit clarity. Exactly how many seconds of your life does it cost to type those extra few keystrokes?