Why is Ruby NOT tail recursive?

I have just been reading a chapter on how to implement tail-recursiveness
in Lisp, and it seems simple enough. Why does not Ruby do it?

Thanks,

-Laza
http://lazax.com/blog

Hi,

···

In message “Why is Ruby NOT tail recursive?” on 04/03/01, Laza laza@mailinator.com writes:

I have just been reading a chapter on how to implement tail-recursiveness
in Lisp, and it seems simple enough. Why does not Ruby do it?

Just because it was too hard to implement tail recursion with the
current interpreter.

						matz.

It would be a nice to have, but on the other hand, converting a tail
recursive call to a while loop is usually a very easy refactoring to make
by hand.

John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter@tait.co.nz
New Zealand

The universe is absolutely plastered with the dashed lines exactly one
space long.

···

On Mon, 1 Mar 2004, Laza wrote:

I have just been reading a chapter on how to implement tail-recursiveness
in Lisp, and it seems simple enough. Why does not Ruby do it?

John Carter wrote:

···

On Mon, 1 Mar 2004, Laza wrote:

I have just been reading a chapter on how to implement tail-recursiveness
in Lisp, and it seems simple enough. Why does not Ruby do it?

It would be a nice to have, but on the other hand, converting a tail
recursive call to a while loop is usually a very easy refactoring to make
by hand.

That question might be a candidate for the FAQ, wouldn’t it?
The answer is here:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/94033

Happy rubying

Stephan