6 ms·
I loved Objective-C when I was developing on the NeXT. I haven't done with it much since then. I don't think it really got the credit it deserved. Templates wou
by deviantbit 3y ago
I loved Objective-C when I was developing on the NeXT. I haven't done with it much since then. I don't think it really got the credit it deserved. Templates would have been nice to have with it. Messages where so useful.
- eschaton 3y agoNah, template metaprogramming really doesn’t fit with the language philosophy; every message-send generates (essentially) the same code because it needs to be handled at runtime time, so templates won’t buy you anything. However, the lightweight generics that we added a decade ago so ago are great for when you want to add additional type hints to catch compile time bugs, just like explicit type declarations in general: They don’t affect the generated code, they just provide additional compiler diagnostics. Swift on the other hand goes far enough down the same terrible rabbit hole as C++ that, as with C++, its type system was recently demonstrated to be Turing complete. Thus long term maintenance of large, complex codebases is going to be much more difficult because you can no longer look at code in isolation and have a basic idea of what it does.
- deviantbit 3y agoI disagree. Templates would have given messages a whole new world. I haven't looked at Objective-C generics. They didn't exist in 1989.