And also note that protocol functions and multimethods also don't need forward declarations as they are polymorphic and the interface is defined ahead of time. So mutually recursive multimethods don't need to use declare at all.
Timothy Baldridge On Fri, Aug 16, 2013 at 10:53 AM, Stuart Sierra <the.stuart.sie...@gmail.com > wrote: > Forward declarations are rarely necessary in my experience: you just get > used to defining your namespaces with low-level primitive functions at the > top and higher-level functions at the bottom. You only need forward > declarations (`declare`) in cases of mutual recursion, i.e. two functions > that call each other. > > -S > > > > > On Wednesday, August 14, 2013 8:56:06 AM UTC-4, Phillip Lord wrote: >> >> >> One of the things that I find unusual with clojure is the requirement >> for forward declaration. While I can see the advantages, managing it by >> hand can be a pain. >> >> So I was wondering, are there any tools for adding declare statements >> when necessary. And better for working out how to reorder function >> declarations to minimize the requirement for forward declarations. >> >> 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. > -- “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/groups/opt_out.