[plt-scheme] Paren Paralysis Sufferers Unite

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Oct 21 13:51:51 EDT 2009

On Oct 21, hendrik at topoi.pooq.com wrote:
> But every proposal I've seen or made gets shouted down with
> complaints of "We've learned to count parentheses -- Why can't you?"

Show me a Schemer/Lisper that counts parentheses, and I'll show you
his fake mustache.

I'm serious.  In http://ll1.ai.mit.edu/shriram-talk.pdf, in the slides
on pages 37-39, I think that Shriram made a major mistake in having
the parentheses on page 39 way too bright, the slide on 37 is much
closer to what I see.

As for editing -- the idea of inserting one paren only (in *any*
language) seems completely broken to me.  In some *styles* of
programming you use much less parens if you use more assignments
(spending a whole 8-spaces on a level of indentation is another
symptom of this disease), but still, when I see a student write

  int foo(int x)
  {
    if (x == 2) {
      printf("blah

I have exactly the same kind of reaction I have for the equivalently
unbalanced Scheme code.  Writing code snippets in browsers is bad
exactly because they always have very primitive notepad-like editors,
and the way I compensate for that is to be even more strict about
always inserting matching delimiters.  I do that even in emails.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.