4 ms·
Care to elaborate? Objective-C's simplicity and minimalism is what makes it one of my favorites.
by buzzert 3y ago
Care to elaborate?
Objective-C's simplicity and minimalism is what makes it one of my favorites.
- pavlov 3y agoI like Objective-C too. It's just C with a very good lightweight abstraction layer for modeling GUI apps. I'm enough of a purist to think Obj-C 2.0 (introduced around 2007 at the same time as iOS) was mostly a mistake. In old Objective-C, it was absolutely clear when you were sending a message. You couldn't mistake a line of C code for an Obj-C message call. But Obj-C 2.0 lets you use the same syntax for message calls and struct member access, as in: foo.view.bounds.size.width Two of these dots are expensive virtual message calls. The other two are practically free stack pointer offsets. It's not in good C spirit to introduce this kind of confusion about performance impact. (However it's very much in the worst C++ spirit of frivolous overrides.) And the benefits were mostly meaningless because the old way (which still works) was barely any longer to type, especially with IDE autocomplete: [[foo view] bounds].size.width
- mpweiher 3y agoYep. And what's even worse is that the semantics are muddled. foo.view.bounds.size.width = 200; This will not set the width of the view to 200.
- another2another 3y ago>But Obj-C 2.0 lets you use the same syntax for message calls and struct member access I'm in 100% agreement, you should never hide the message passing syntax, and am not a fan of this feature. Alas it was probably introduced as a sop to those people that are constantly complaining about the syntax, and in the process made the language worse ergonomically, not better.
- orasis 3y agoThere is nothing simple or minimalist about C style separate header files with hacked on property synthesizers. The language is an aggregation of hacks.
- Apocryphon 3y agoThere can be simple, minimalist aggregation of hacks.