On Wed, Dec 06, 2000 at 08:31:07AM -0700, Nathan Torkington wrote:
> Simon Cozens writes:
> > Why does string C<eval> have to screw everything up?
> 
> It doesn't.  String eval is the escape hatch from a language that
> can't do what you want it to do.  As such it's okay for it to be
> slow--consider it incentive to fix the language :-)  The runtime
> system should be able to load the compilation system and say
> "turn this SV into a CV in this lexical scope," and then call the
> CV.

The problem isn't the speed of `eval STRING' or the compilation system,
it's how to make it exist and work. To make `eval STRING' work, the
whole of the compiler has to be there, waiting, whenever a program is
run. That means a theoretical binary compile of `print "Hello world\n"'
has to come packaged with howevermany megs the Perl executable takes up.
And that all ports, for example JVM and Palm, have to implement the
compiler natively, rather than just having code compiled elsewhere and
sync-ed to the Palm or run from the JVM.

Simply deciding that `eval STRING' is "unimplemented" on these
theoretical ports and binary compiles is the best idea I've heard yet,
but we should remember that `require' is built on `eval STRING'.

-dlc

Reply via email to