[446] in java-interest

home help back first fref pref prev next nref lref last post

more on java vs. python

daemon@ATHENA.MIT.EDU (jsw@cs.brown.edu)
Thu Jun 22 15:17:26 1995

Date: Thu, 22 Jun 1995 14:46:56 -0400
From: jsw@cs.brown.edu
To: java-interest@java.sun.com
Reply-To: jsw@cs.brown.edu



One very useful feature about python is that it has an 'exec'
statement that allows you to execute python code contained in a string
as in:
>>> code="print 'hello world'"
>>> exec(code)
hello world

This is useful because you can use the exec statement to run any code
that you want while you have a program running.  You can also run
python in the interactive mode and do the same thing.  This makes
prototyping and interacting with your running application even easier.


When I first saw that java was interpreted, I thought that maybe it
would have the same feature, but now I realize that java code is still
compiled and only interpreted between the byte code to the machine
code.  

Am I missing something, or is there a way that something similar can
be done in java?  

thanks,
jeff

 --------------------------------------------------------------------
| Jeff White jsw@cs.brown.edu http://www.cs.brown.edu/people/jsw/    |
| "So you run and you run to catch up with the sun but it's sinking  |
| Racing around to come up behind you again" - pink floyd            |
 --------------------------------------------------------------------
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post