chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Re: Style Guide


From: F. Wittenberger
Subject: Re: [Chicken-users] Re: Style Guide
Date: Tue, 06 Nov 2007 10:30:33 +0100

Am Montag, den 05.11.2007, 17:42 +0100 schrieb Sunnan:
> Mark Fredrickson wrote:
> >
> > Here's a related question for more experienced Schemers: In Dybvig, he
> > states that the define form:
> >
> > (define square (lambda (x) (* x x)))
> >
> > is to be preferred to
> >
> > (define (square x) (* x x))
> >
> > After reading that, I started using the first form religiously. Now
> > I'm not so sure. For no small part because the text editor I use
> > (TextMate) doesn't highlight the first form as a function definition
> > but does highlight the second form.
> >
> >   
> The second form.
> Shorter is better.
> Always, always, always.

For pure chicken code this maybe correct.

But some Scheme implementations happen to treat the former form as a
global variable, which can be set! later on, while the latter is beeing
compiled into a static binding and set! on it will raise an error.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]