Okay, this is coming up again and I want to get it nailed down.
Current semantics, as defined:
$Px = compreg $Sy
returns a compiler for language $Sy.
compreg $Sx, $Py
defines $Py as the compiler for language $Sx.
$Px = compile $Py, $Sz
uses compiler $Py (from a compreg call) to compile the source $Sz and return a sub $Px for it. That sub may then be invoked as need be, stuffed in a namespace, or whatever.
That's fine, it works, woohoo and all. (Though I'm not sure the same-name-swapped-args compreg for finding and registering's a good idea. Or, rather, I think it's a bad idea, my fault, we should fix)
Now, the issue is how to actually build a compiler. Right now a compiler is a simple thing -- it's a method hanging off the __invoke vtable slot of the PMC. I'm not sure I like that, as it seems really, really hackish. Hacks are inevitable, of course, but it seems a bit early for that. (We ought to at least wait until we do a beta freeze...) On the other hand it does make a certain amount of sense -- it's a compilation subroutine we're getting, so we ought to invoke it, and I can certainly live with that.
Time to weigh in with opinions, questions, and whatnot. There's not much reason to JFDI and make the decisions final, so weigh away and we'll just nail it all down on wednesday.
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk