Clojure does support forward referencing (if I understand your question): user=> (declare a) user=> (defn b [x] (a x)) user=> (defn a [x] (b x)) user=> (a 4) java.lang.StackOverflowError Note: (declare a) is a synonym for (def a) which works also.
It is also quite trivial to patch the compiler to auto-def symbols as it finds them instead of throwing an error. That makes it hard to discover typoed symbols. One strategy to have the best of both worlds would be to allow auto-def until a non-def call is made, and at that point warn if there are any unbound. Not quite correct for a fully dynamic language. Regards, Tim. On Mar 12, 2:23 am, quasar <quasistellarli...@gmail.com> wrote: > It seems it makes Clojure source code to be in the order of lowest-to- > highest abstraction. > Naive mutual recursion based on top-level functions is impossible. > I am curious, is it due to the current implementaiton of Reader or by > design? > > Best regards, > Leonid --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---