all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Lisp code formatting....
@ 2003-03-07 20:25 Sandip Chitale
  2003-03-07 21:49 ` Barry Margolin
  0 siblings, 1 reply; 3+ messages in thread
From: Sandip Chitale @ 2003-03-07 20:25 UTC (permalink / raw)


I was reading through the emacs lisp manual and came across the
following paragraph:

   * Don't make a habit of putting close-parentheses on lines by
     themselves; Lisp programmers find this disconcerting.

Why do "Lisp programmers find this disconcerting" ? Do *all* Lisp
programmers find this disconcerting ? I don't.

     Once in a while, when there is a sequence of many consecutive
     close-parentheses, it may make sense to split the sequence in one
     or two significant places.

Isn't this arbitrary ? It does not sound like a standard.

Can Emacs lisp gurus shed some light on this ?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Lisp code formatting....
  2003-03-07 20:25 Lisp code formatting Sandip Chitale
@ 2003-03-07 21:49 ` Barry Margolin
  2003-03-08 14:25   ` Kai Großjohann
  0 siblings, 1 reply; 3+ messages in thread
From: Barry Margolin @ 2003-03-07 21:49 UTC (permalink / raw)


In article <b607d812.0303071225.576996cb@posting.google.com>,
Sandip Chitale <sandipchitale@yahoo.com> wrote:
>I was reading through the emacs lisp manual and came across the
>following paragraph:
>
>   * Don't make a habit of putting close-parentheses on lines by
>     themselves; Lisp programmers find this disconcerting.
>
>Why do "Lisp programmers find this disconcerting" ? Do *all* Lisp
>programmers find this disconcerting ? I don't.

The majority of people with several decades of experience.  We learned the
standard programming style from each other, just like other idioms of the
language.

>     Once in a while, when there is a sequence of many consecutive
>     close-parentheses, it may make sense to split the sequence in one
>     or two significant places.
>
>Isn't this arbitrary ? It does not sound like a standard.
>
>Can Emacs lisp gurus shed some light on this ?

Since there are so many parentheses in Lisp code, devoting a line to each
close paren wastes lots of space and clutters up the definition.
Parentheses tend to be viewed as noise, so they shouldn't be emphasized so
much.  While the Lisp implementation cares about them quite a bit,
programmers tend to depend on indentation to see the structure of the code.
And editors like Emacs automate the indentation process.

-- 
Barry Margolin, barry.margolin@level3.com
Genuity Managed Services, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Lisp code formatting....
  2003-03-07 21:49 ` Barry Margolin
@ 2003-03-08 14:25   ` Kai Großjohann
  0 siblings, 0 replies; 3+ messages in thread
From: Kai Großjohann @ 2003-03-08 14:25 UTC (permalink / raw)


Barry Margolin <barry.margolin@level3.com> writes:

> Since there are so many parentheses in Lisp code, devoting a line to each
> close paren wastes lots of space and clutters up the definition.
> Parentheses tend to be viewed as noise, so they shouldn't be emphasized so
> much.

Yeah, I find it so difficult to get the message across to people that
neither Lisp, with so many parentheses, nor Python, which much fewer
parentheses, are really problematic.  When reading, you read the
indentation.
-- 
A preposition is not a good thing to end a sentence with.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-08 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-07 20:25 Lisp code formatting Sandip Chitale
2003-03-07 21:49 ` Barry Margolin
2003-03-08 14:25   ` Kai Großjohann

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.