Programming Language History

Ken D'Ambrosio ken at jots.org
Thu Dec 8 16:54:00 EST 2005


Paul Lussier wrote:

>Ben Scott <dragonhawk at gmail.com> writes:
>
>  
>
>>LISP fans tend to approach everything recursively, because
>>recursion is fundamental to LISP.
>>    
>>
>
>Well, I wouldn't go that far.  Recursion only works for problems which
>can be solved recursively.  And there are plenty of problems which
>*can* be solved recursively, but are best not to due to performance
>problems (unless you start using tricks like caching and memoization)
>  
>
I got in trouble once for being a smart-alec.  Our prof gave us a test
(Pascal -- ah, the joys) with various questions.  One of them was
obviously supposed to be solved as a recursive problem, but I realized
that you could use the ol' (n^2+n)/2=(say,a triangle made of checkers,
with "n" checkers on a side) equation, and save an awful lot of
writing.  [I always hated computer exams that required writing code with
a pencil.]

The answer was technically correct.  But he was not amused.  Pesky
thinking-inside-the-box teachers.  Guess that that's why they were still
teaching Pascal... ;-)

-Ken



More information about the gnhlug-discuss mailing list