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

Re: Shootout Stuff



Eli Barzilay <eli@barzilay.org> writes:

> Out of a total of 441426 lines, I think that the statement that
> "That doesn't happen in reality" is very reasonable.

It was just an example.

I find that even the double indentation suffers from the problem I
describe:

  (define-values (listener port)
    (let loop ([port 8000])
      (with-handlers ([void (lambda (exn) (loop (add1 port)))])
        (values (tcp-listen port)
                port))))

See how those parentheses pull your eye along the lower left chunk?
The lower portion of the parentheses points directly at the next line.

  [define-values (listener port)
    [let loop ([port 8000])
      [with-handlers ([void (lambda (exn) (loop (add1 port)))])
        [values (tcp-listen port)
                port]]]]

To me, this stair step is clearer (and would be more so with 3 or 4
spaces, but that's not really my point).

> > My point was more with regards visual aesthetics and the 'look' of
> > a scheme program (hint - squint your eyes and stare at it).

> I swear I've squinted and I've squinted -- for a full minute and saw
> nothing but my program -- and I'm serious -- I squinted so I could
> not read the characters, but the structure of let's named let's,
> if's, and define's was *very* clear (and colorful on my Emacs
> setup).

> (At some point I though that I saw a 3D picture of a big lambda
> symbol rotating wildly...)

Well, I suppose it might be pretty difficult for some people with many
years of experience to let go, 'unlearn' and just stare at the code as
if you didn't know it.  I'm not trying to knock scheme.  It's plenty
obvious that people who take the time can get quite used to reading
the code - people are adaptable.  What may be true, is that for the
untrained eye (which probably doesn't include anyone on this list -
keep that in mind before saying "but, but, but..."), following those
parentheses might be just a bit more difficult than other structures,
visually.  That's all.

I still think it would be interesting to try out my proposed
experiment with a variety of visually diverse languages.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/