------ art_61480_31362220.1184886934268 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/19/07, M. Edward (Ed) Borasky <znmeb / cesmail.net> 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. > > Interesting. This is wild speculation of course, but I imagine you are probably atypical as far as always using explicit stacks. (Since I get the impression from your post history that you are heavily focused on performance.). I would guess (more speculation ;)) that if someone were to grab a set of programs that for instance walked an XML DOM (or a similar day to day tree structure, like a nested directory) that the vast majority of those programs would use recursion with implicit stacks. Now that I've contributed that bit of unsubstantiated nonsense, I'll resume eating my dinner. :) ------ art_61480_31362220.1184886934268--