3 ms·
That was my thought when I saw it done too... The PDF I linked to at the bottom of the article shows a full implementation in C which is pretty awesome. If I re
by aarongough 16y ago
That was my thought when I saw it done too... The PDF I linked to at the bottom of the article shows a full implementation in C which is pretty awesome. If I remember correctly it's only a couple of hundred lines long.
At the moment I am in the process of writing a VM which provides basic functions tailor-made for implementing a language this way. Should be interesting to see how it turns out...
- ekiru 16y agoThe send macro is a particularly clever bit of the C implementation. It uses GCC ({ }) compound statement-as-expression macros and static variables to insert an inline method cache at every place that you send a message to cache the result of lookup.