3 ms·
ObjC is more expressive than you think. It has the same metaphors of duck typing that ruby/python/javascript have come to adopt. You can do mixins & monkey pa
by catch23 17y ago
ObjC is more expressive than you think. It has the same metaphors of duck typing that ruby/python/javascript have come to adopt. You can do mixins & monkey patching very easily with ObjC as well. I would say ObjC rates very well in terms of flexibility of development.
ObjC is definitely more enjoyable than Java or C++ and just slightly less efficient than ruby/python. ObjC feels closer to ruby/smalltalk than it does to python. If I had my choice of language, I'd probably choose javascript or ruby, but ObjC comes close in second.
Even if you hate Apple, you should consider looking at ObjC on GNUStep.
- tumult 17y agoI've written an Objective-C compiler and runtime myself, so I think I am familiar with its limitations. Monkey patching is a terrible idea and you should avoid ever seeing that stuff in production. Objective-C is 'flexible' but dangerous in that it does not offer much in the way of type safety, and relies on handling unrecognized messages at runtime to deal with both unexpected conditions (exceptions) and also errors made by the programmer (type errors, undefined behavior, null objects, etc). Objective-C has only a small fraction of the potential performance of C++ so should not even be compared with it. They are in completely separate categories. Objective-C is used primarily as a higher-level glue for routines written in C. You cannot write all of your routines in Objective-C all the way down, because the performance is dynamic and often worse than languages with smart VMs. LuaJIT, MacRuby, and several others all have better performance (in terms of function dispatch, calling, etc) than Objective-C. If you want Objective-C code to perform well, you just start using C stuff instead of Objective-C classes and methods.