Subject: Re: Dangling Closing Parentheses vs. Stacked Closing Parentheses
From: Erik Naggum <erik@naggum.no>
Date: 2000/03/29
Newsgroups: comp.lang.lisp
Message-ID: <3163280191819937@naggum.no>

* Paolo Amoroso
| The fact that the dangling parentheses convention is closer to other
| languages like C and C++ may be a good reason not to use it :)

* Anthony Cartmell
| Seems to me that this really is the main reason...  is the Lisp layout
| "standard" really this sad?

  there is another, deeper reason behind this that you may have overlooked.

  in C, parentheses are used for a number of fundamentally different tasks,
  and in C++ it gets _completely_ insane, but that's another matter.  after
  a student of C has learned the painful precedence rules by rote and is
  still trying to internalize them so he can just _read_ expressions, the
  parentheses enter the picture as a source of pain or a painkiller when
  the precedence rules do not match the requirements of the expression.
  either way, there is pain.  you will often find C programmers battle
  their operators and their precedence rules for hours on end, recompiling
  frequently because they don't have an interactive environment, either.
  the lesson learned by that vestige of primitive brain that keeps us from
  sticking a hand into hot water the second time, is that parentheses are
  painful.  that a C programmer could have gotten rid of the pain by using
  parentheses consistently around his operators and arguments is lost by
  this primitive part of the brain.

  then Lisp comes around and it's all parentheses.  primitive brain shrieks.

  this is probably not restricted to C, but a property of that horrible
  mathematical infix syntax that is supposedly "natural" and which _also_
  has precedence rules in which parentheses play an important role,
  including the implied multiplication in the absence of operators.  it
  could be that early childhood experiences with the utter mindlessness of
  infix syntax and the need for parentheses to escape out of the stupid
  rules they made up is actually exceptionally traumatic on young brains
  who try to trust their ability to understand the world around them.
  parentheses break their trust, so when they see Lisp and it's all
  parentheses, they become psychotic.  this would explain a lot.  a LOT!

  however, the parentheses in Lisp are just like the semicolon in C.

  here's an experiment you can conduct at home: take a piece of C code to
  which a large group of people have contributed, several thousand lines of
  Open Source should do, modify it slightly in some useful and non-trivial
  way that people would probably like, and insert a newline before every
  semicolon and indent the line an extra tab relative to the line it used
  to belong to, ship the code to all the people who have contributed and be
  very enthusiastic about your improvements, but don't comment on the style
  change.  if you do _not_ receive realistic death threats, consider the
  experiment a failure.

#:Erik