Wednesday, February 06, 2013

Programming language compiler and virtual machines

Today I came across a post touting Topaz, an implementation of Ruby. That implementation uses RPython, which powers PyPy. And it just struck me, how many times I see "we implemented language X using language Y". I understand, a lot of it is just scratching an itch, playing with a toy. Self-hosting makes sense to me. I can understand wanting to use your favorite language in a mature ecosystem (all the languages hosted on the JVM). But I think that I don't get the rest. If you know Python well enough to write a compiler for Ruby in it, why aren't you just coding in Python? If Haskell is so great for "correct" code, why write a Perl VM in it?
I really am curious, is it just play, or is there an underlying sense I'm missing.