Re: NEW PHP standalone compiler (was Re: [PHP-DEV] Herewe try again)

From: Date: Fri, 01 Feb 2002 11:03:24 +0000
Subject: Re: NEW PHP standalone compiler (was Re: [PHP-DEV] Herewe try again)
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-78761@lists.php.net to get a copy of this message
Manuel Lemos wrote:
Unless I'm mistaken, Java doesn't have eval. Any language with eval needs a runtime environment when executing, even if the rest of the code is converted to C
I am not expert in Java (actually I don't program in Java - MetaL generates it for me if I ever need it), but I suppose that what eval does is what java.lang.Compiler class is for.
java.lang.compiler is a little different ... 1) Java *has* a complete runtime environment available at runtime, the JVM and the standard classes, that's why JVMs tend to be so big and have a rather large startup time overhead 2) java.lang.Compiler takes a java source file and compiles it into a class file, so the result is persistent and you have to have your code wrapped up to a complete class, write it to filesystem, compile it, load the compiled class into the JVM and then execute eval just executes statements within the eingine, and what you pass to it has to be just a complete statement, not a whole class -- Hartmut Holzgraefe hartmut@six.de http://www.six.de +49-711-99091-77 Wir stellen für Sie aus auf der CeBIT 2002 und freuen uns in Halle 6 auf Ihren Besuch am Stand H 18

Thread (47 messages)

« previous php.dev (#78761) next »