Hacker News new | ask | show | jobs
by mschaef 3160 days ago
You should take a look at the Chambers and Ungar papers on the implementation of Self. In Self, _everything_ is theoretically done through message send/dispatch. This includes field access, numerical operations, flow control... the works. (In a language with prototypical inheritance too.)

What's interesting is that by the time they're done with their optimizations, they manage to get relatively close (x2, iirc) to native speed by essentially inlining everything they can and keeping enough metadata around that they can retain the dynamic properties of the languauge. Impressive stuff. (Which is probably why Sun hired them early in the Java/JIT days.)