[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnu-arch-users] Re: Tla spork
From: |
Miles Bader |
Subject: |
[Gnu-arch-users] Re: Tla spork |
Date: |
Fri, 27 Aug 2004 12:53:43 +0900 |
Mikhael Goikhman <address@hidden> writes:
> Nope, this would be:
>
> if (a1 + a2 - a3 > 0) { b1 = b2(b3 + b4) } else { c1 = c2(c3 + c4) }
> versus:
> (if (> (- (+ a1 a2) a3) 0) (set b1 (b2 (+ b2 b3))) (set c1 (c2 (+ c3 c4))))
>
> And which one is more readable?
They both look about the same to me. In this case where both expressions
are quite short, the use of a keyword `else' doesn't make much
difference; with somewhat longer expressions it might. Of course with
longer expressions you'd use additional syntactic cues to aid
comprehension anyway, which tends to lessen the advantage of having
keywords.
E.g.
if (a1 + a2 - a3 > 0)
b1 = b2(b3 + b4)
else
c1 = c2(c3 + c4)
versus:
(if (> (- (+ a1 a2) a3) 0)
(set b1 (b2 (+ b2 b3)))
(set c1 (c2 (+ c3 c4))))
There's little difference in readability.
Of course someone who simply _doesn't know_ about prefix expressions,
but is familiar with traditional mathematical notation, might prefer the
former. The question is whether the burden of learning something new is
outweighed by the vast potential for abstraction offered by a very
regular syntax -- or not. I guess it depends on the users...
-miles
--
Suburbia: where they tear out the trees and then name streets after them.
- Re: [Gnu-arch-users] Re: Tla spork, (continued)
- Re: [Gnu-arch-users] Re: Tla spork, Tom Lord, 2004/08/24
- Re: [Gnu-arch-users] Re: Tla spork, James Blackwell, 2004/08/24
- Re: [Gnu-arch-users] Re: Tla spork, Tom Lord, 2004/08/24
- Re: [Gnu-arch-users] Re: Tla spork, James Blackwell, 2004/08/25
- Re: [Gnu-arch-users] Re: Tla spork, tomas, 2004/08/26
- Re: [Gnu-arch-users] Re: Tla spork, Zenaan Harkness, 2004/08/26
- [Gnu-arch-users] Re: Tla spork, Stefan Monnier, 2004/08/26
- Re: [Gnu-arch-users] Re: Tla spork, Zenaan Harkness, 2004/08/26
- [Gnu-arch-users] Re: Tla spork, Miles Bader, 2004/08/26
- Re: [Gnu-arch-users] Re: Tla spork, Mikhael Goikhman, 2004/08/26
- [Gnu-arch-users] Re: Tla spork,
Miles Bader <=
- Re: [Gnu-arch-users] Re: Tla spork, Zenaan Harkness, 2004/08/27
- [Gnu-arch-users] Re: Tla spork, Miles Bader, 2004/08/27
- Re: [Gnu-arch-users] Re: Tla spork, James Blackwell, 2004/08/27
- [Gnu-arch-users] Re: Tla spork, Stefan Monnier, 2004/08/27
- Re: [Gnu-arch-users] Re: Tla spork, James Blackwell, 2004/08/27
- Re: [Gnu-arch-users] Re: Tla spork, Miles Bader, 2004/08/27
- Re: [Gnu-arch-users] Re: Tla spork, James Blackwell, 2004/08/28
- Re: [Gnu-arch-users] Re: Tla spork, Stig Brautaset, 2004/08/28
- Re: [Gnu-arch-users] Re: Tla spork, Andrew Suffield, 2004/08/28
- Re: [Gnu-arch-users] Re: Tla spork, James Blackwell, 2004/08/28