From: Neil Stevens Date: 2005-12-17T15:07:46+09:00 Subject: Re: Ruby tail recursion Jakub Hegenbart wrote: > Tail calls are essentialy safe GOTOs with argument passing, there is a > potential for performance gain. ;-) But in Ruby, its benefits wouldn't > be that noticeable, I guess...I kind of don't think that the programming > style that Ruby encourages is a good candidate for tail call > optimization. :-D 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! -- Neil Stevens - neil@hakubi.us 'A republic, if you can keep it.' -- Benjamin Franklin