Subject: Re: PROGN considered intrusive?
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1999/03/23
Newsgroups: comp.lang.lisp
Message-ID: <7d7726$h6d@fido.engr.sgi.com>
David B. Lamkins <dlamkins@teleport.com> wrote:
+---------------
| Yup.  Who remembers the "super-parens" [ and ] that were so popular some
| years ago.  And how often do you see them now?
+---------------

MzScheme treats [...] as identical to (...), except you have to match the
closing kind with the opening kind, and I've seen a bunch of MzScheme code
that uses the square versions to (try to) make reading multiple levels of
parens easier in forms like case/cond/let/etc.:

	; snippet from mzscheme/collects/standard/dater.ss
	(cond	
	  [(and (= month 2) (leap-year? year)) 29]
	  [(= month 2) 28]
	  [(<= month 7) (+ 30 (modulo month 2))]
	  [else (+ 30 (- 1 (modulo month 2)))])

or:

	(letrec ([odd? (lambda (x) (if (zero? x) #f (even? (1- x))))]
		 [even? (lambda (x) (if (zero? x) #t (odd? (1- x))))])
	  ...body...)

Personally, I don't like the style, since I've gotten used to relying
on a paren-matching editor and indenting, which lets me totally ignore
the closing brackets. And having a right bracket show up in the middle
of a run of right parens (as in the last line of the first example or
the next-to-last of the second) is, well, a bit jarring.  But YMMV...


-Rob

-----
Rob Warnock, 8L-855		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
2011 N. Shoreline Blvd.		FAX: 650-964-0811
Mountain View, CA  94043	PP-ASEL-IA