From: Timothy J. H. <tim...@ma...> - 2004-05-02 21:34:38
|
On May 2, 2004, at 4:25 PM, Matthew Munz wrote: > Tim, > > I don't think a comparison of SISC to JScheme is off-topic at all, > and I think this thread belongs on the SISC list. I've CC'd this response to the SISC-users list and to the Jscheme-users list. Maybe it should go to the Kawa-users list too? One of the main goals of Jscheme is to provide a Scheme with the "best" interface to Java, where "best" means most powerful, easy-to-use, and transparent interface to Java. I think the SISC philosophy is to provide the very best Java implementation of R5RS Scheme. The SISC developers and users can certainly give a more authoratative statement of SISC's goals viz-a-viz these issues. > >> If you have any questions about Jscheme, feel free to ask... > > Two questions. > > 1) Is JScheme being actively developed? Yes. Ken Anderson and I are the developers and we are actively developing it. We do however take a fairly conservative approach and try to keep the system relatively simple. We have accepted contributions from the Jscheme user community (e.g. modules, R5RS macros, serializable Jscheme terms, etc.). Both Ken and I are actively using Jscheme for various projects, so we are heavy users as well as language developers. Jscheme is being used in other projects, and we should probably maintain a list of back pointers to projects that use Jscheme, but we haven't done so. (Any Jscheme-users that want to have a back-pointer to their work, please send me a link and I'll put it up!) > 2) JScheme's syntax seems to be rather unique. How portable is > JScheme code? If you are talking about porting to other Scheme interpreters, then you can certainly write in a portable subset of Jscheme, but all of the Java interface code will have to be rewritten. Jscheme complies with most of R4RS Scheme with two exceptions: * we don't provide full call/cc (but we do have tryCatch for exception handling, and we do have an interpreter that implements full call/cc if you really need it and can pay the overhead) * strings are not mutable (as they are implemented as Java strings, which are immutable) Also, many of the optional aspects of R4RS are not implemented (e.g. the full numeric tower, although you could easily write a full numeric tower using java.math.BigDecimal....) Jscheme, as with almost all Schemes, does have several extensions that are not portable: * javadot notation -- no one else has this syntax, but it can be converted to SISC or KAWA syntax ... * tryCatch -- which provides exception handling (and exception handling is not part of RNRS yet). * quasistrings -- which can be easily replaced with calls to (string-append .....) * macros -- the "native macro" is a LISP style (define-macro ....), but R5RS macros are also supported as an add on package * modules -- we have a very simple module system that allows you to import all procedures in a module and to add a prefix (using (environment-import FILENAME PREFIX) it also allows you to import macros (using (language-import FILENAME PREFIX). We have used Jscheme to write applets, servlets, and Java Web Start applications, by writing a little wrapper class in Java that reads the Scheme code and calls the JScheme interpreter. Jscheme runs nicely on all Java platforms we've tried (Mac OS, Linux, Windows). > > The thing about JScheme that seems interesting to me is that the > usability of the FFI appears to be quite high. If you think of a > programming language as an organism, living in a larger environment, > then you can classify its charistics by fittness or "survivability" > within that environment. I think that languages that form a symbiosis > with both programmers and other machines/programs will have a > significant competitive advantage. The ease of portability and > integration with existing systems is thus very important, from this > view. Jscheme integrates very nicely with Java and other Java based languages (you can easily write Jscheme programs that call Jython and JRuby interpreters....) It also provides a great debugging tool for Java programs as it gives you a powerful tool for directly calling your Java code in a Scheme REPL loop! > > To put it bluntly, the SISC FFI is important to me because there is > a lot of Java bytecode out there, and I'd like to be able to leverage > it easily! The thing I like most about Jscheme is that it allows me to write Scheme code that can easily call and be called from the Java Universe. Matthias Felleisen suggests that we call it Scriipt Java since it really can be thought of as a Scripting language for Java code..... I find the SISC FFI more difficult to use, but if someone wants a fully-featured R5RS in Scheme with full numeric tower, call/cc, macros, and good efficiency, I always tell them to look at SISC. If on the other hand, their primary interest is in scripting Java using Scheme, then I tell them to look at JScheme! ---Tim Hickey, http://www.cs.brandeis.edu/~tim > > Matthew M. Munz > mat...@em... > http://munz.2y.net/ > > > -- > ___________________________________________________________ > Sign-up for Ads Free at Mail.com > http://promo.mail.com/adsfreejump.htm > |