3 ms·
Having public things be in the header and private things in the .m seems exactly right! The header should only expose the public interface, not the implementati
by dilap 13y ago
Having public things be in the header and private things in the .m seems exactly right! The header should only expose the public interface, not the implementation details, no?
(On the other hand, defining properties in an anon category, instead of just plain old instance variables in the .m, seems pointless to me -- why have a layer of indirection for the class to access itself?)
- bitserf 13y agoI'm a heavy user of properties in other languages like C#, but in Objective C, to define the anonymous category with all the property ceremony and verbiage, feels...excessive...if all you need is some private state, and you don't care about generated accessors or KVO. Why are ivars bad, exactly? They're a lot more succinct if you don't actually need what properties give you.
- dilap 13y agoRight, exactly.
- frou_dh 13y agoIf we take "should" and run with it then there should be no archaic header files at all and instead a.. gasp.. real module system :-)