At 09:54 PM 10/23/00 +0100, Simon Cozens wrote:
>On Mon, Oct 23, 2000 at 04:38:12PM -0400, Dan Sugalski wrote:
> > The one thing that just occurred to me is that we're going to need to
> > support multiple interpreter targets simultaneously. Having the back-end
> > emit C source isn't going to get those BEGIN blocks very far. :(
>
>Don't forget that those BEGIN blocks are *supposed* to be instructions
>to the compiler.
Er, but a lot of people seem to use them for other things :-)
> > Runtime string eval, do, and require are a serious pain in the butt.
> > They're the one set of things that'll force a real interpreter into a
> program.
>
>*nodnod*. This is really tricky; if there's no eval in the program, we can
>make all sorts of interesting optimizations: forego the whole SV process, and
>just use ints and char*s and whatever. If there's an eval, you've got to throw
>everything back into Perl-space, embed an interpreter, and all that jazz.
What about introducing a pragma which either (a) promises not to use such
things, or (b) throws an exception if the program does use such constructs,
and say "if you want your programs to be compilable (or compile to
something a heck of a lot lighter), say 'use strict "compilation"' or
whatever"?
--
Peter Scott
Pacific Systems Design Technologies