On Oct 24, 2:44 am, Chris Dow <[email protected]> wrote:
> Is there any way to attach Clojure defined 'metadata' to to types?  I
> am trying to write a ORM for records and would like some way to attach
> 'metadata' to types for the sake of mapping configuration.  Clojure's
> built-in metadata apppears to be intended only for instances of
> types.  I could use Java's annotations but as far as I can tell there
> is no way to define new annotations in Clojure.  Are these my only
> options?

How about using protocols to fetch metadata? SQLRat uses this
approach:
http://bitbucket.org/kumarshantanu/sqlrat/wiki/tutorial/EntityDefinition

>
> If these are my only options, does anybody know if Clojure's future
> development will include better annotations support?  Are Java
> annotations intended to be purely for the sake of compatibility with
> Java or is there a desire to better integrate them them into Clojure?

AFAICT Clojure supports annotations but they are recommended for Java-
interop *only*.


Regards,
Shantanu

-- 
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