"Marshall T. Vandegrift" <[email protected]> writes:

> So, is this entirely expected behavior?  Or am I missing something
> which would make initializing the defining namespace happen as part of
> a static initializer for the AOTed `deftype` class?

To answer my own question, the Clojure wiki page on the 1.2-introduced
datatypes [1] includes "loading accompanying namespace for deftype?" on
the same "ideas" list as "Explicit ctor sigs? ... with bodies?"
Slogging through the compiler codebase shows that `deftype` indeed does
not include the necessary code in generated classes' `<clinit>`s.

Somewhat-relatedly, does anyone know why `gen-class` doesn't jump
through the same class-loader hoops that `deftype` does in order to
support iterative development within the same REPL session?  By grabbing
the private clojure.core/generate-class function, I was able to cobble
together an alternative version which seems to work.

[1] http://www.assembla.com/wiki/show/clojure/Datatypes

-Marshall

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to