From: Hal Fulton Date: 2005-12-17T15:29:47+09:00 Subject: Re: Ruby tail recursion Neil Stevens wrote: > > Good point. Tail-call recursion is just a form of recursion that's easy > to turn into iteration, but (at least to me) one of ruby's strengths is > its iterators, so one might as well just write code in iterative form > instead of tail-call recursive form! > Well, my take is this. If you happen to write recursive code, and it happens to be tail-call optimizable, the interpreter should be smart enough not to let the stack grow unnecessarily. That's a fairly easy fix if I understand rightly. That's a separate issue from whether that style is necessarily the best in a given situation. Hal