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

Java compatibility idea


There were talk about making BeanShell bytecode-compatible with Java by
writing bytecode compiler. While it is good solution, I thought that
there is another one, maybe simpler and more flexible.

Do you know what NetRexx does when it compiles its source code? It first
translates it to regular .java file and then invokes java compiler for
it. BeanShell is much more similar to Java than NetRexx so writing such
a translator would be even better solution.

Pros and cons:
+ (important) allows people to write prototype code in BeanShell and
then automatically convert it to Java (note that I think of translator
which would produce well-looking Java code, or ugly code + some
beautifier :-)
+ writing text translator is simpler, less bug prone
+ allows people to distribute their source code as Java so anybody
without BeanShell interpreter can run it (although anybody should get
one :-)
- it's slower

Just an idea, but very good one I think.


Max Gilead (gilead@linart.pl) http://3d.linart.krakow.pl/OfficinaArtificialis