[MUD-Dev] Scripting languages
Mike Shaver
shaver at off.net
Sun Jun 29 21:36:01 CEST 2003
On Jun 29, Mark 'Kamikaze' Hughes wrote:
> There's four approaches to doing scripting in Java.
> 1) Interpreted. Writing interpreters in Java is very easy, but
> it's not very fast. I'm a bit of a freak, I guess, having
> written several little language interpreters in Java, but it's
> one of the easiest languages to write good interpreters in.
> 3) Compiled. If you're really hardcore, you can try writing a
> compiler to produce bytecode and then load those classes. I do
> not recommend it, because it has no advantages over the
> pseudo-compilation process, and it's non-trivial to make legal
> class files. Leave that to javac.
Mozilla's "Rhino" runs in either of those modes, depending on your
configuration: it takes JavaScript source and interprets an internal
bytecode format, or compiles Java classfiles. It includes a pretty
sweet reflection model and has been adopted by a fair number of
organizations.
If you have a good JiT, the performance is quite good, and the
embedding interface is very straightforward.
http://www.mozilla.org/rhino/
Mike
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list