[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another take on hackers and painters




On Tuesday, May 20, 2003, at 10:43 PM, Anton van Straaten wrote:
> Another answer to your original question, in Java's case, would be 
> that you
> could runtime-compile the code in question, and dynamically load the
> resulting bytecode, all using built-in capabilities of Java.  
> Application
> servers do this kind of thing all the time.  So there are multiple 
> ways to
> achieve a practical 'eval' capability in Java.

Anton,

For simple expressions, I agree. But the general case might be trickier 
than it sounds. For example, could you add/remove ivars from a class 
that other classes inherit from at runtime? (Does Java compile 
references to ivars as pointer offsets causing a fragile base class 
problem?) Can you change existing methods at runtime? What if the 
method argument types change? Can you change a type definition at 
runtime? What happens to the rest of the code in the system that 
depends on the old type?

Cheers,
Steve
Io, a small language: http://www.iolanguage.com/