[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: following up on speed



sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr.  Preprocessor]) writes:

> For example, when we teach them about tail recursion, they have this
> unexplainable urge to never use non-tail recursion ever again, and it
> takes them a while to get back to earth again.  (Does anyone have a
> psychological explanation for this?)  The same holds for performance
> analysis.

IMO converting non-tail recursion to tail recursion was taught too early
when I took SICP, and I suspect it still usually is.  If the first 50
non-tail recursive calls they see are supposed to be turned into tail
calls, they'll think "convert to tail call" every time they see a
non-tail call recursion after that.


-- 
<brlewis@[(if (brl-related? message)    ; Bruce R. Lewis
              "users.sourceforge.net"   ; http://brl.codesimply.net/
              "alum.mit.edu")]>