From: Robert Dober Date: 2007-07-19T23:23:43+09:00 Subject: Re: The Pebble in the Ruby Shoe On 7/19/07, M. Edward (Ed) Borasky wrote: > Logan Capaldo wrote: > > > You've never written code to traverse some kind of tree? And if you have, > > you did it all iteratively? I would suggest _lots_ of programmers use > > recursion, even in C. > > There's a big difference between an explicit stack with iterative code > and recursion with an implicit stack. I've done a lot of explicit stack > coding for walking data structures -- indeed, the last time I did so was > a recent piece of code that generates the state space of a large finite > Markov chain. But the only time I've written recursive functions as a > *preferred* modus operandi has been in Lisp, Scheme and the Lisp-based > symbolic math package Derive. And there, I've always aimed for tail > recursion. > > I see recursion as a useful tool of abstraction I remember having implemented quick sort on a Sharp PC [forgot the name] in its primitive Basic dialect. There were 13 cells left to be sorted LOL. Never ever has a program given me more satisfaction, but nowadays I would rather not waste my time on doing it manually, well I remember a fascinating post of James explaining that unwinding the stack has become second nature to him. But who else will be able and/or willing to read your program? Just my 2 nickels. R. > > > -- I always knew that one day Smalltalk would replace Java. I just didn't know it would be called Ruby -- Kent Beck