On Tue, Jul 9, 2013 at 11:39 PM, Mats Rauhala <mats.rauh...@gmail.com>wrote:
> Clojure people say that jvm doesn't support tco, which it doesn't. So > they implemented a recur macro that turns the function into an > explicitly tcoable function. But, take a look at scala. It can do > (naive) tco optimization without any extra effort from the developer. > And on other lispy languages, check out sisc which is a scheme in jvm > which too can do tco within jvm. Are clojure designers just lazy or is > there a good reason for this .. lie? > The Clojure philosophy is that it is rather irritating to think your recursive call is going to be cleverly optimized into a loop, and then if you're wrong, you have no good way to know that. So the idea is that you use the word "recur" to indicate that *you* think it can be optimized into a loop, and then the compiler tells you if you are right or wrong. -- -- 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.