On Oct 15, 11:48 am, Stuart Sierra <the.stuart.sie...@gmail.com>
wrote:
> On Oct 15, 7:56 am, Laurent PETIT <laurent.pe...@gmail.com> wrote:
>
> > if the clojure classes depend on the java classes in the implementation and
> > not in their interfaces ( extends, implements, methods signatures ), then
> > you can write your gen-class with a separate namespace for the
> > implementation of the class ( using :impl-ns ). Then you compile clojure
> > code in 2 pass : 1/ compile the namespaces that use call gen-class and
> > gen-interface for generating the class stubs 2/ compile java 3/ compile all
> > the remaining clojure code.
>
> I used this approach in the past, now I try to avoid circular
> dependencies like this.
>
> -SS

Sure, this sometimes works for new and smaller projects.
Even then there are enough cases where circular dependencies could
easily be a justified part of a design.

However, back to how this relates to the adoption of Clojure by
industry.
Many companies trying to embrace Clojure would replace parts of their
existing Java code bases piecemeal as they come up to speed with
Clojure.
Many of them will be forced to deal with this issue. I'm wondering if
there's an elegant
solution for them to help with Clojure being a practical option in
those places ?

It probably goes without saying that the ability for Clojure to deal
with circular dependencies
and bi-directional relationships between Java and Clojure code is
quite important for it's successful adoption in the mainstream.

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