I can see that, and even spec has this use case. In Spec it's solved by having both A and B in one namespace and using declare to forward-declare the constructors (or defns in this case).
So I guess the way I see it the tradeoff is a declare and all-in-one-namespace vs a massive complexity addition to the compiler and the redefinition of compilation units. The declare method seems like the cleaner route. On Fri, Dec 30, 2016 at 5:45 PM, Mark Engelberg <mark.engelb...@gmail.com> wrote: > On Fri, Dec 30, 2016 at 4:38 PM, Timothy Baldridge <tbaldri...@gmail.com> > wrote: > >> >> So the layout looks like this: >> >> Interfaces.clj >> | >> ------------------------------------------------ >> | | >> ImplementationA Implementation B >> | | >> ------------------------------------------------ >> | >> Orchestration (Setup) Namespace >> >> >> > > The problem I've had with this is that Implementations A and B are > generally going to be records. For best performance, you want to write the > implementation of a record's protocols directly inside of the record. If > the implementation of A requires constructing a B, and implementing a B > requires constructing an A, you've got a problem because a record's > constructors aren't part of Interfaces.clj, but are part of the namespaces > in which the records are defined. > > -- > 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 > --- > 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 clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- 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 --- 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 clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.