Why can't the clojure bytecode compiler hand-perform this like functional languages do when compiling to native code? Is it to keep the clojure compiler fast (for dynamic runtime compilation), since performing tail call optimisation presumably requires a bunch of extra checks and more complex code generation? Perhaps this could be done on AOT compilation?
On Aug 3, 2:58 am, Frederick Polgardy <f...@polgardy.com> wrote: > It means that the JVM doesn't look at method calls and figure out that > they're in tail call position and optimize them. You can hand-write code that > performs a goto in a tight loop (like recur does), but means you can't assume > that method calls in general will be tail call optimized. > > -Fred > > -- > Science answers questions; philosophy questions answers. > > On Aug 2, 2010, at 4:09 PM, Dale wrote: > > > The JVM has an unconditional goto opcode and the ability to re-bind > > function parameters, so why no tail-call optimization? Thanks. > > > Dale > > > -- > > 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 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