[pypy-dev] Questions for Armin

Rocco Moretti roccomoretti at netscape.net
Tue Jan 21 04:49:56 CET 2003

On removing eval(), Nathan Heagy <nathanh at zu.com> wrote:

>The only reason I bring it up, and I'm not really in any position to be 
>bringing things up, is that it seems to me that this dynamic 
>metacompiling stuff could be a real pain for making things fast and 
>optimized. Most fast languages don't have eval() and that may be part 
>of the reason they are fast. I'm sure Guido could jump in with a 
>wonderful reason why eval() is great but I think if it disappeared no 
>one would miss it, especially if it let Python compile to machine code. 
>In fact if that was the price of enabling Python to compile to machine 
>code I *guarantee* no one would miss it.

Having eval() is no impediment to compiling Python to machine code in the common case. What's the difference between a Python program which doesn't use eval() and one where eval() is prohibited?

To deal with eval() in compiling to machine code, you could do one of two things: (1) Halt with an error saying that eval() is not supported (use the Python interpreter instead), or (2) Tack on an additional function which replicates the function of the Python interpreter to handle the argument to eval().

As I understand it, (2) is close to the equivalent of what Psyco currently does for the "uncommon case" anyway.


The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

More information about the Pypy-dev mailing list