3 ms·
Objective-C: lack of enforced constructors. Sure, by convention you're supposed to call the "init" function for the class, but you don't have to. There's really
by potatolicious 18y ago
Objective-C: lack of enforced constructors. Sure, by convention you're supposed to call the "init" function for the class, but you don't have to. There's really no good way to guarantee your object has been initialized correctly!
- rbanffy 18y agoIt's objetive, but, after all, it's also C... I find the Smalltalk-ishness of it a little weird when it intersperses with more traditional C code.
- jemmons 18y agoI don't get what the noise is about here. Millions of lines of objc code have been written without mass confusion of how to init objects. It might look good on paper, but in practice telling people "this is the designated initializer" seems to be more than sufficient to sort things out. And being able to initialize an object with anything (or, remember, to have anything initialize an object) only adds to the flexibility and dynamic character of the language.