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
 
Duane Rettig  
View profile  
 More options Mar 28 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Duane Rettig <du...@franz.com>
Date: 2000/03/28
Subject: Re: Dangling Closing Parentheses vs. Stacked Closing Parentheses

"Anthony Cartmell" <AJCartm...@csi.com> writes:
> I'm looking for reasons for *not* using one paren per line.

I don't think that this is true.  Your list below does not
reflect what you had been given at the time of your posting.

>  So far I have:
>  1) Lisp people just don't do it, for reasons lost in the mists of time,
> probably to do with small screens.
>  2) It doesn't look nice for people who are not used to looking at that
> layout style - "visual clutter".
>  3) Errr...
>  4) that's it.

> Can anyone extend my list?

Let's start with correcttions.

The first part of #1 has to do with de-facto standards.  It is
perhaps interesting that almost every lisp programmer disagrees
on something about what lisp should be and do, especially when
dealing with style.  However, it is precisely this tendency to
disagree that makes it so blatanttly obvious when we almost
entirely agree on the issue of dangling parens.

The last part of #1 has to do with screen real estate.  Serious
question: Do you print out your lisp code on paper in order to
look at it?  Or do you have a portrait terminal instead?  Rules
of thumb in any language usually say that you shouldn't have much
more than a pagefull per function, so the question pertains to
your style of viewing code.

#2 looks more like what was said about parens giving no useful
information.  I once read some assembler code from a newbie
programmer that had learned in school that comments must be
used as much as possible.  I don't remember the architecture
that was used, but the code was unreadable because of the
clutter, e.g.

  mov count,r10  ; Move count into register R10
  add 1,r10,r10  ; Increment r10 by 1
  b L4           ; Branch to L4

This programmer's code was full of useful comments like this...

A paren, useful to a compiler should be ignorable to a programmer,
just like a comment line, (sometimes) useful to a programmer,
should be made ignorable by a compiler.  If you fail to add whatever
syntax is required to make a comment invisible to the compiler, the
compiler will barf, because it mistakes the comment for real code.
And if you fail to make parens invisible to the programmers, the
programmers barf, because they are mistaking the parens for real
code.

I will ignore your #3 and #4, and replace them with:

 3) As I posted earlier in this thread, it is the strong opinion
of the lisp that right parens should not dangle.  Just try to get
the lisp printer to print lisp forms with dangling parens; even
setting *print-right-margin* to 1 doesn't help...

 4) Whenever I see lisp code for review, I look for both algorithmic
and/or implementational bugs based on what I see in the code.  One
of the tools I use is to assess the programming level of the programmer
submitting the code.  It involves many factors, most of which are
probably subliminal.  But having thought about it for a day or so,
I can say that whenever I see dangling parens, it contributes to
one of two assessments: "newbie" or "careless".  Note that careless
can apply to me as well; I sometimes see code that I have written
previously which is sloppily formatted, and it is the assessment I
give myself as I correct it.

--
Duane Rettig          Franz Inc.            http://www.franz.com/ (www)
1995 University Ave Suite 275  Berkeley, CA 94704
Phone: (510) 548-3600; FAX: (510) 548-8253   du...@Franz.COM (internet)


 
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.