[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Re: Tla spork
From: |
Zenaan Harkness |
Subject: |
Re: [Gnu-arch-users] Re: Tla spork |
Date: |
Fri, 27 Aug 2004 15:10:47 +1000 |
On Fri, 2004-08-27 at 13:53, Miles Bader wrote:
> 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...
This is the perfect example (now it's expanded). It is short, clearly
described on both sides, and even a "layed out" version, to make it
easier to read (and the lisp indented version reminds me of Emacs config
files).
You say someone who "doesn't know" - well you explain it clearly, so I
can look at it and do the replacement of the latter (prefix expr) to
create the former (mathematical notation), in my head. I "know" how to
make sense of it (at this moment at least - tomorrow, if it were
isolated and without the corresponding expansion, it might be another
story).
Yet I look at it and _really_ have to think about it. Every time I look
at it.
Right now as I look again (for the third time).
It doesn't flow for me. I have to juggle the pieces in my head for it to
make sense. Even with the common/ math version right above it.
I can't explain why this is the case, only that it is my experience. I
look, and feel stupid; feel thoroughly disempowered.
I suspect the "seeming natural" thing might come to me if I spent some
not insignificant time writing some non trivial software with such a
language. That's just a guess and to be honest my _feeling_ is that it
would take a month or so at least. I could be wrong though - I consider
myself a good programmer. And I dove into the guile tutorial at least
twice, as previously mentioned. I have really wanted to 'get it', but so
far without the willingness to put in more than a few hours.
Due to my feelings and expectation of time and effort required for
familiarity, I simply wouldn't jump in and work on such a language this
year - the feeling is like "starting way behind the eight ball and I'll
be much more productive, immediately, in most other languages I know".
It would be a great thing if someone were to figure out how to write a
two hour tutorial that allowed people to "click into" the right thinking
mode for lisp-like languages. I've hunted and played in the past and
haven't found it (yet). I do think I'm missing out on something as a
result, and I do plan to get to it one day.
cheers
zen
--
Homepage: http://www.soulsound.net/
Please respect the confidentiality of this email as sensibly warranted.
- Re: [Gnu-arch-users] Re: Tla spork, (continued)
- 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, 2004/08/27
- Re: [Gnu-arch-users] Re: Tla spork,
Zenaan Harkness <=
- [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
- Re: [Gnu-arch-users] Re: Tla spork, Tobias C. Rittweiler, 2004/08/28