Hacker News new | ask | show | jobs
by chrisseaton 2870 days ago
> at compile time

That's the key thing - other languages which solve this solve it dynamically.

1 comments

Yeah, that’s what a JIT does. Unfortunately that’s not something that Apple really wants to open the door to on their platforms, especially for native code.
I don’t think that comes into play here. Objective-C is C, and although you could JIT any language, C isn’t made for it, both philosophically (one of its main claims to fame is ‘close to the metal’) and technically (a source file cold be compiled multiple times with different macro definitions or with a different set of #included files)
C isn't made for JIT because it's static; that's why inclining exists. Objective-C has room to improve because it has dynamic function calls.
C can also benefit from inline caching - function pointers!