[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: Style Guide
From: |
Tobia Conforto |
Subject: |
[Chicken-users] Re: Style Guide |
Date: |
Mon, 5 Nov 2007 17:19:04 +0100 |
User-agent: |
Mutt/1.5.16 (2007-06-11) |
Mark Fredrickson wrote:
> There is certainly a idiomatic style of Scheme, but I think the actual
> style as defined by the layout of the source code matters as well.
> Those two documents were useful reads to some who frets over such
> issues (me).
Yes, I'm correcting my style based on those documents too.
> 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.
I'm no experienced schemer, but I like the second form best because it
makes it visually clear how the function will be called: looking at
(square x) it's obvious what the parameters and their formal names are.
When I see a (square 3) later on in the code, I will recognize it
instantly ("visually") as an application of (define (square x) ...)
Plus it's shorter.
Tobia
- [Chicken-users] Style Guide, William Ramsay, 2007/11/04
- Re: [Chicken-users] Style Guide, Peter Bex, 2007/11/04
- [Chicken-users] Re: Style Guide, Tobia Conforto, 2007/11/05
- Re: [Chicken-users] Re: Style Guide, Peter Bex, 2007/11/05
- Re: [Chicken-users] Re: Style Guide, Mark Fredrickson, 2007/11/05
- [Chicken-users] Re: Style Guide,
Tobia Conforto <=
- Re: [Chicken-users] Re: Style Guide, Sunnan, 2007/11/05
- Re: [Chicken-users] Re: Style Guide, F. Wittenberger, 2007/11/06
- Re: [Chicken-users] Re: Style Guide, Sunnan, 2007/11/06
- Re: [Chicken-users] Re: Style Guide, Kon Lovett, 2007/11/06
- Re: [Chicken-users] Re: Style Guide, Sunnan, 2007/11/07
- Message not available
- Re: [Chicken-users] Re: Style Guide, Sunnan, 2007/11/07
- Re: [Chicken-users] Re: Style Guide, Elf, 2007/11/06
- Re: [Chicken-users] Re: Style Guide, Benedikt Rosenau, 2007/11/07
- Re: [Chicken-users] Re: Style Guide, Elf, 2007/11/07
- Re: [Chicken-users] Re: Style Guide, Benedikt Rosenau, 2007/11/07