Subject: Re: 'define-list' with mzscheme
From: (Rob Warnock)
Date: 19 Dec 2001 12:25:08 GMT
Newsgroups: comp.lang.scheme
Message-ID: <9vq0v4$1fpks$>
David Golden  <qnivq.tbyqra@bprnaserr.arg> wrote:
| Rob Warnock wrote:
| > Learn to read & indent in proper Scheme (or Lisp) style, where
| > programmers read the *indenting*, not opening parens and *especially*
| > not the closing parens (which are just line noise and should always
| > be bunched up on the first possible line).
| Well, if you're reading the indenting, and consider the parens "line 
| noise", there's a definite argument for using a simple 
| indentation-sensitive Scheme reader - see Sugar...

(*sigh*) Another missing of the main point. One more try:

When posting code *here* for others in the field to read, one should
use standard formatting and standard indenting -- neither C-style nor
non-standard reader syntax. If you don't, you create a barrier to people
who try to read your code, which is also a barrier to helping you. If
it looks *too* awful, some will simply give up and hit "n". Others will
patiently advise you on proper formatting -- once -- and then give up
if you persist in writing something other than what experienced Scheme
(or Lisp) programers are comfortable reading.


p.s. Re oddball Scheme readers: A little over 5 years ago, I created
a "Parentheses-Lite" infix dialect of Scheme for use by hardware
engineers doing initial device bringup in the lab. It was basically
a specialized reader that parsed infix into standard Scheme S-exprs,
and passed them to "eval". The similarity of the surface syntax to Tcl
was quite deliberate:  ;-}  ;-}

	plite> def x=3 y=5 z=x*(y-1)+2
	plite> list x y z
	 ==> (3 5 14)
	plite> def fact = fn n in if n == 0 then 1 else n * [fact n-1]
	plite> fact 5
	 ==> 120
	plite> map fact [iota 10]
	 ==> (1 1 2 6 24 120 720 5040 40320 362880)

And of course I used it for most of my own miscellaneous scripting/hacking,
until I finally discovered that for larger programs it was significantly
*less* convenient than fully-parenthesized Scheme. I found myself writing
more & more code in pure Scheme syntax (using an escape mechanism), and
ultimately I abandoned P'Lite completely, returning to standard syntax.
So while I fully understand the allure [and it was certainly fun to do!],
I now consider it a false digression. (Which is why I have some definite
reservations about portions of Paul Graham's "Arc" effort...)

Rob Warnock, 30-3-510		<>
SGI Network Engineering		<>
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA

[Note: and aren't for humans ]