Hi,
Am Dienstag, 16. April 2013 11:32:38 UTC+2 schrieb Pierre Allix:
>
> Thank you the patch works.
>
> I though it would have made sense to just create a record directly from
> Java since they can implement Java interfaces.
>
>
As a rule of thumb, I go with the non-AOT behaviour of Clojure. In that
case the record does not exist until the namespace is required. So if I
want to use it (in particular directly from Java), I have to require the
namespace upfront to actually create the record class. And even if AOT
would behave differently (think gen-class: require implementing namespace
on class init), doing it explicitly is more robust because it allows both -
AOT and non-AOT - usage.
But as I said before: I would not create the record directly but go through
the support functions ("->Bar", "map->Bar"). Or even higher level
constructing functions. In Java this is probably the factory pattern.
Meikel
--
--
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
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.