On Sun, 12 Jun 2005, Nikodemus Siivola wrote:

> I suspect one reason some people dislike loop is that very few 
> implementation get all of it right, making things more confusing then 
> they really are.

One of the main reasons why some people avoid loop is that it is generally 
much harder to reason about the correctness of an iterative block of code 
than for equivalent recursive code that makes structural induction (even 
if it's only over natural numbers) explicit. (Besides this, it's easier to 
port loop-free code to other functional languages.)

My impression is that people with a background in numerical calculations 
will generally prefer a loopish style, presumably because that's what they 
were brought up with, while more algebraically minded people (like me, 
for example) avoid it like hell.

-- 
regards,               [EMAIL PROTECTED]              (o_
 Thomas Fischbacher -  http://www.cip.physik.uni-muenchen.de/~tf  //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y)           V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1))                  (Debian GNU)


Reply via email to