#126: Provide mechanism for user to extend Java classes via Lisp ----------------------+----------------------------------------------------- Reporter: mevenson | Owner: nobody Type: task | Status: new Priority: minor | Milestone: unscheduled Component: java | Version: 1.0 Keywords: | ----------------------+----------------------------------------------------- [http://stackoverflow.com/questions/4785969/can-you-write-a-java-class- with-abcl/4803353#4803353 In a question on StackOverflow] a user asks if it is possible to extend a Java class in Lisp. This sort of functionality generally seems to be unavailable in any JVM language, only possible by using bytecode libraries. Since we have a fairly complete bytecode library in our Java class writer, it might provide a distinguishing feature to implement such an extension mechanism.
#126: Provide mechanism for user to extend Java classes via Lisp -----------------------+---------------------------------------------------- Reporter: mevenson | Owner: nobody Type: task | Status: new Priority: minor | Milestone: unscheduled Component: java | Version: 1.0 Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment(by mevenson):
I envision this as resulting in a Java class that has specialized constructors/static initializers that somehow "connect" a given Lisp implementation (hashtable of constructors, variables, and methods?) to a running instance of Interpreter.
Some questions towards an implementation:
1. Syntactically how would one specify access to member variables in the superclass?
2. The Lisp implementation would probably have to be marked as final, as enabling the extension of the Lisp version again in Java would be too tough?
3. Would one have to run static initializers in the super class(es)?
The more I think about it, this would be a non-trivial amount of work, as it basically means re-inventing much of the mechanisms of Java (the language) in Lisp.
armedbear-ticket@common-lisp.net