Brandon Bloom <brandon.d.bl...@gmail.com> writes: > >> The closest I have got it: >> (declare create-alice) >> (declare create-brian) > > Yup, that's A-OK. You can also just write (declare create-alice > create-brian). > > The tricky bit comes in when you actually need to refer to the types by > name directly. Say, if you wanted to create mutually recursive deftypes > with type hints (maybe for host interop reasons). In that case, you can > indirect through interfaces/protocols: > > (defprotocol IFoo ...) > (defprotocol IBar ...) > > (deftype Foo [^IBar bar] ...) > (deftype Bar [^IFoo foo] ...) > > If you genuinely need mutually recursive types and can't indirect through > protocols (or interfaces), then you probably have a particular JVM interop > use case and should just write Java for that purpose.
Thank you, this is a very good answer! Phil -- 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/groups/opt_out.