3 ms·
> Except objective C, which objectively sucks Objective-C is my preferred language. - It has the complexity/expressiveness balance correct, it's not the 'poin
by spacedcowboy 5y ago
> Except objective C, which objectively sucks
Objective-C is my preferred language.
- It has the complexity/expressiveness balance correct, it's not the 'point a warhead at your head' of C++, neither is it the primitive belt-and-braces approach of C.
- It has a relaxed memory-allocation model with ARC that I very rarely have to worry about, and when I do, it's fairly obvious what to do. Generally just call [object-class new] and forget about it.
- It's binary compatible with C and C++, so if I really need the speed of either of those two, I just drop into them instead for the small amount of code I need, or use a library.
- It's named-parameters to methods make it easy to understand what a method in a class will do - though it's sometimes carried to extremes I agree.
- It has a really nice standard library that comes with it, and the framework/bundle idea makes packaging things up really easy
- In the debugger, I can always call a long stream of nested method-calls and get back the expected result, because message-calls are not function-calls.
- No dependencies are needed for any produced code (well, you need the system frameworks, but that's like saying libc.so is a dependency). You don't have to worry about whether you have PHP v5,6,7,... or Python 2.x vs 3.x. Just run the app.
All that for some [...] syntax. Except that a lot of that isn't even necessary any more with the '.' property-like syntax.
No, it's not memory-safe - and that would be nice, but you'd give up the ability to just drop into C/C++, which is too high a cost IMHO.
It's just a shame ~Apple~ Lattner decided he wanted to do his own language instead of continuing to improve ObjC.
- eddieh 5y agoI, unapologetically, love Objective-C too. So much so that I registered https://objc-lang.org https://objc-lang.org. I haven't done much with it. It is hosted from this repo: https://github.com/objc-lang/objc-lang.org https://github.com/objc-lang/objc-lang.org