Subject: Re: define-syntax: considered harmful.
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1998/06/06
Newsgroups: comp.lang.scheme
Message-ID: <6lag2t$5ca5k@fido.engr.sgi.com>

Brian Harvey <bh@anarres.CS.Berkeley.EDU> wrote:
+---------------
| I think this argument suffers from its ahistorical perspective.
+---------------

Yeah, right. As John Brunner pointed out (in chapter-heading quotes in
his novel "Stand on Zanzibar"):

  "Those who do not learn from history are doomed to repeat it."
        -- Santayana

  "The only thing we learn from history is that we learn nothing from history."
        -- Hegel

  "Hell, I know guys don't know from *yesterday*! Hegel, he must be taking
  the long view."
        -- "The HipCrime Vocab", by Chad C. Mulligan [a character in the novel]

+---------------
| The title of the thread refers, of course, to the classic "GOTO Considered
| Harmful" paper.  ...  Today, many people, including certainly
| everyone in *this* newsgroup, easily take in stride the idea of programming
| without *assignment*, for greater expressive power, something that I bet
| would have boggled the minds of those early structured programming folks.
+---------------

Actually, I believe most of them understood the concept quite well. And it
was not "greater expressive power" that they were trying to achieve, it was
REDUCED INTELLECTUAL COMPLEXITY. They well understood the implications for
programming of the classic paper "The Magical Number Seven Plus or Minus Two":
that the amount of information we can hold in short-term memory at any one
time is actually quite *small*, and that to deal with larger & larger programs
while continuing to be able to reason reliably about those programs would
require limiting ourselves to constructs that didn't entangle us with unbridled
complexity. GOTOs were such a construct, since they allowed execution graphs
of unlimited complexity. And -- suprise, surprise! -- so are globals:

	Wulf, W. A., and Shaw, M., "Global Variable Considered Harmful,"
	SIGLPAN Notices 8(2), February 1973. 

wherein Bill Wulf & Mary Shaw showed that even when using "strict" structured
programming constructs [sequencing, if (or case), loop, and procedure call],
allowing even a single global variable opens you up to the exact same
untrammelled complexity as the unrestricted GOTO!!!  [Hint: You can easily
transform any GOTO graph into a single "(while <var> case <var> ...)" loop.
Assuming that you allow... (*drumroll!*)... assignment of that variable!]

To return to the original topic:  Syntax extensions, like any other form
of abstraction (including procedures), are useful to the extent that they
reduce the difficulty of comprehending the behavior of the programs, and
not useful when they increase it. (Much like any other sharp tool.)

Note that sometimes the concepts "more expressive" and "more comprehensible"
get mixed up. But they're not the same (although they *sometimes* can go
together). It's important to keep that in mind.


-Rob

-----
Rob Warnock, 7L-551		rpw3@sgi.com   http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
2011 N. Shoreline Blvd.		FAX: 650-933-4392
Mountain View, CA  94043	PP-ASEL-IA