Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.perl Subject: Re: can we ever compile perl? Message-ID: <14768:Dec1322:50:0990@kramden.acf.nyu.edu> Date: 13 Dec 90 22:50:09 GMT References: <9592:Dec920:40:5190@kramden.acf.nyu.edu> <110306@convex.convex.com> Organization: IR Lines: 19 In article <110306@convex.convex.com> tchrist@convex.COM (Tom Christiansen) writes: > In article <9592:Dec920:40:5190@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: > >1. Compile some large subset of the language to portable C code. > We usually say "well, but not evals of course." Even without evals this would make Perl a lot more useful. Of course, half the advantage disappears if the Perl-in-C library isn't freely redistributable---but at least that, unlike the entire language, can be rewritten in pieces. The other half of the advantage stays in any case: no parsing time, single executable, easy hand optimization, easy use of fast calculation. And there's no reason an eval can't be compiled. ``It's too much work to stick the compiler into the library!'' you say. Well, most evals in practice are just fixed operations applied to variable string arguments. There's no reason your example couldn't be compiled into fixed code--- the only parsing left after compilation would be the regexp parsing. ---Dan