Hello. I'm new to Lisp. I'm learning Common Lisp, and I'm trying to take a (brief) look at Clojure. For now, I'm looking for answers to the following questions:
1) Classes a) gen-class: OK, but limited by Java (single inheritance) "If you want to create a class and add methods and even have some (immutable) state, gen-class and friends offer many features. If you really want to write a class with setFoo/getFoo functions on top of mutable fields I recommend you use Java to do so." (Rich Hickey's answer to a Kyle Smith's question, http://groups.google.com/group/clojure/browse_thread/thread/7f5cf3e78954b81d/aae7f082c51337c9?lnk=gst&q=class+fields#aae7f082c51337c9) So, it's impossible to use Clojure code to generate the following Java class: class MyClass { private int myIntField; int getMyIntField() { return myIntField; } void setMyIntField( int val ) { myIntField = val; } } Is it possible to use pure Clojure code to generate the following Java classes: class MyClassA { int myIntField; } class MyClassB extends MyClassA { int myNewIntField; } b) Some structures inheritance? Is some form of (preferably multiple) structure inheritance supported? So far, I haven't found anything like that, but I think it would be possible to be implemented with macros. c) CLOS? Does Clojure offer something similar to CLOS (multiple inheritance) known from Common Lisp? 2) In Common Lisp it's possible to define reader macros, and thus create a new syntax. Is it also possible in Clojure? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---