Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Dangling Closing Parentheses vs. Stacked Closing Parentheses
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christopher Browne  
View profile  
 More options Mar 29 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: cbbro...@news.hex.net (Christopher Browne)
Date: 2000/03/29
Subject: Re: Dangling Closing Parentheses vs. Stacked Closing Parentheses
Centuries ago, Nostradamus foresaw a time when Anthony Cartmell would say:

>"Erik Naggum" <e...@naggum.no> wrote in message
>news:3163031395198264@naggum.no...
>>   such as their own lines.  in Common Lisp, the list structure is much
>less
>>   important than the indentation, and the perspicuity of normal
>indentation
>>   rules is sufficiently high that the parens are mainly used there for the
>>   machine to use, not humans.  therefore, humans would tend to get parens
>>   in CL out of the (visual) way, while the braces in C must be very
>visible.

>Sorry for the "newbie" question, but I thought that the indentation was
>based on the list structure, and not the other way round.  If the parens
>were based on the indentation then we wouldn't even need to use them.  My
>whole reason for using dangling parens in my code is to show which
>open-paren each close-paren closes by its indentation.  I don't understand
>why this is such a bad layout style.

It's not that it's "such a bad layout style."  

It's that if you're using a text editor that provides *any* support
for paren matching (just about anything better than MSFT WordPad), or
one that provides indentation support (e.g. - like Emacs), then
there's no *value* to having the parens dangle.

And if it's not really buying you anything, then the cost of having
less on the screen is a real cost, and *THAT* is the Bad Thing.

>>   different languages have different optimization parameters for almost
>>   every facet of their expression.  trying to optimize CL code layout with
>>   the parameters from C is completely braindamaged and merits
>>   nothing but a snort, and people who are _that_ underdeveloped in
>>   their understanding of the differences between languages should
>>   just be sedated and put away.

>I lay my Lisp code out the way I do for the reason given above, and not
>because of any other language's layout style.

>>   which.)  I think the need to understand how things came to be applies to
>>   everything, but retracing the steps of decisions made by large groups of
>>   people is usually quite depressing, so there is wisdom in accepting the
>>   authorities at times.  yet, accepting or rejecting authorities _because_
>>   they are authorities is really retarded and people who are prone to this
>>   should also be sedated and put away.

>Couldn't agree more.  What I'm trying to do, prompted by criticism of my
>code layout in a public place, is to find out *why* the Lisp community
>rejects one-paren-per-line apparently so strongly.  If there's a good reason
>I *may* change the coding layout I've used successfully, with others, for
>the last eight years.

>Does anyone know?

Because the extra lines and extra whitespace are a *distraction.*

Because screen space is *always* at a premium, regardless of how big
the screen is.  

Wasting a line is a waste of a line, and wasting a whole line for one
lousy parenthesis is just plain silly.  If you have a deeply nested
object, it's going to be followed by potentially a whole screen of
lines that have nothing more than a single parenthesis.
--
"Parentheses?  What  parentheses? I  haven't  noticed any  parentheses
since my  first month of Lisp  programming.  I like to  ask people who
complain about  parentheses in  Lisp if they  are bothered by  all the
spaces between words in a newspaper..."
-- Kenny Tilton <t...@liii.com>
cbbro...@hex.net- <http://www.hex.net/~cbbrowne/lisp.html>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.