Why is Ruby NOT tail recursive?

Y

Yukihiro Matsumoto

Hi,

In message "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?

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

matz.
 
J

John Carter

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.


John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : (e-mail address removed)
New Zealand

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top