Someone posted a comment asking why, if we're doing closures and continuations in perl, we didn't choose a Lisp VM? (Or, by inference, a Scheme VM)
That's a darned good question. And, given that I'm pretty close to MIT as these things go (it was in comfy walking distance of where I worked for years) I do get asked it a lot.1 This wasn't as common a question for perl 5, and I presume python and ruby, as the language developed slowly and in concert with its interpreter.
The short answer, which made it into the Linux Magazine article (though not yet online--it's in the April 2003 issue, which just hit the newsstands around here) is that I didn't know about the Lisp and Scheme VMs when I started all this. Which is very true, and ultimately the real answer.
A more interesting answer is to the question "If you could do it again, would you choose a Scheme VM?" In this case most likely the Scheme-48 VM, as a number of folks who I respect speak very highly of it.
The answer to that, though, is still No. The reasons for that answer are the interesting ones. If you're a big Lisp or Scheme fan you may want to stop now, as I'm likely going to offend.
Since I'm responsible for making sure Perl 6 runs, I have three big concerns for any solution: functionality, portability, and supportability.
Functionality's the obvious one. If the chosen solution can't run the perl 6 Larry designs, it's no good. The language design is affected to some extent by the back end, and there have been features that have been changed because of features and limitations of the VM, but ultimately if Larry wants it I have to support it and, more to the point, I have to make it fast. That's fine, it's not like Scheme-48 is slow, but the design decisions that drive it are based on the needs of Scheme. Perl's needs are somewhat different--there's that whole "syntax" thing if nothing else. Sure the VM is turing complete, so everything I need for perl is doable, but doable isn't the issue. It's doable quickly. And I'm not sure there's a good match there. Could be wrong, of course, but if it came down to it, changes to Scheme-48 (or any Scheme or Lisp VM) that favored perl at the expense of Scheme or Lisp would be rejected, as they should be.
Portability is a second issue, but it's the one I'm worried the least about. This is, after all, Lisp we're pondering--if a piece of hardware had a two bits, a program counter, and an accumulator someone ported Lisp to it.
Supportability is the third issue. This is the big one, and by far the biggest killer of the deal.
For this to work, I need to support it. And I need to have enough folks in the perl community willing and able to support it. A good working knowledge of Lisp or Scheme is generally absent from the Perl community, and amongst those folks who do have an adequate knowledge of it the general feeling about Lisp is similar to the one I have when I find things with suckers or eyeballs on my pizza. (Which is fair enough, as many folks feel the same way about perl) It's possible that working on a Scheme VM wouldn't require Scheme knowledge, but... I really doubt that.
The development community backing Scheme and Lisp is also much smaller than the one backing Perl. Granted, there's a much higher percentage of people willing and able to bang the metal amongst Lispers than Perl folks, but still... numbers count. I don't need that many people to work on the engine, and I never expect more than five folks competent and active at any one time on the back end, but that core needs to be there, and it's going to have to come from the perl end of things, since I can't count on it from the Lisp end.
So, we have our own VM, one tailored to our needs, which is just fine. There's nothing wrong with another VM in the world--the world is, after all, a large place and there's plenty of room. And it's not like the Lisp or Scheme folks need anyone to choose their VMs for other projects for any sort of external validation.
1 I presume if I was in other places they'd ask the same about one of the Modulas, ML, or HaskellPosted by Dan at April 3, 2003 01:32 PM | TrackBack (0)