News for hackers. Stuff that matters.
Re:Objects All the Way Down by vidarh on Friday November 27, 2015 @10:49AM (#10637719)
Amending it to say machine integers doesn't help. There's a neat trick used by at least one language implementation (unfortunately the name escapes me) where the language is fully semantically defined in itself, but where the implementation then "cheats" by recognising certain patterns in the definition and replacing them with lower level machine representations.

So you can have objects all the way down if you like. You just need something (such as an interpreter or compiler) that recognises your own self-consistent definition and swaps out pieces of it for a more reasonable implementation.

Admittedly it might be seen as a bit of a cheat, but I quite like it because it treats the mapping from a logically "pure" model to machine as an implementation issue. I'm working on a Ruby implementation and took the opposite model of having a lower level representation that I can "escape" into to implement the low level details, but I'm tempted to re-implement the small parts of the core that I can't do in pure Ruby to work the same way, as a experiment (though I better actually find some time to finish making it self-hosted first)

There are no comments on this comment yet.