> Does anyone know a straightforward way to create a constructor using
> gen-class that takes an argument of the same class as the class you're
> generating?

I've actually hit a related problem: a generated class cannot have  
type annotations for itself (because, as you've noticed, the class  
doesn't exist yet), and thus ends up using reflection when calling its  
own inherited methods. I end up annotating the 'this' argument with  
the superclass name, but of course that's not strictly correct.

> On a different note, is there a capitalization convention for classes
> created with gen-class? Is it CamelCase since they're java classes for
> all intents and purposes? Or hyphen-case since we want to spread the
> love?

I use PascalCase. (camelCase is where there's a hump in the middle.) ;)

--~--~---------~--~----~------------~-------~--~----~
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
Note that posts from new members are moderated - please be patient with your 
first post.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to