[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

27580: Re: [MUD-Dev] Scripting languages

[Full Header] [Plain Text]
From: Mike Shaver <shaver@off.net>
Newsgroups: nu.kanga.list.mud-dev
Date: Sun, 29 Jun 2003 21:36:01 -0400
References: [1] [2] [3] <-newest
Organization: Kanga.Nu
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@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev