From: Timothy J. H. <ti...@cs...> - 2004-05-21 19:53:36
|
On May 21, 2004, at 3:15 PM, Ken Anderson wrote: > I think you can generate the code with dclass/dclass.scm ( which now > needs to be changed to use either JS or JScheme. It would write the > wrapper code for you. Nice! Do you think this syntax could be easily modified to easily add javadoc comments somehow, e.g. with a (javadoc {......}) command as below? ---Tim--- > > > (define-class > > (package groupdemo) > (import "jscheme.*") > > (javadoc {comments on the class...}) > (public class GroupServerW) > > (SchemeProcedure groupserver) > > (javadoc {comments on the constructor ...}) > (public GroupServerW (int port) > (.groupserver$# this (make-group-server port))) > > (javadoc {comments on the instance method}) > (public void quit () (groupserver 'quit)) > > (public static void main (String[] args) > (main args))) > > I've long wanted to create a minimal JScheme in which all of the primitives were implemented directly using javadot (we have this in jscheme/Bootstrap*.scm) and where the Java classes implementing JScheme are implemented, metacircularly in JScheme using dclass as above! (Some of this is already there, e.g. the reflection classes defining JavaField etc, are effectively reimplemented in the Scheme modules jsint/compiler/Reflection.scm ...) This would provide an implementation of JScheme entirely in JScheme (modulo the standard Java libraries). Building a JScheme/dclass->JVM byte code interpreter a la KAWA would complete the transformation of Java into Scheme and I would never have to write another Java class or rely on another Java compiler again! :) ---Tim--- |