Subject: Re: (no subject)
From: (Rob Warnock)
Date: 1999/03/13
Newsgroups: comp.lang.lisp
Message-ID: <7cccp6$>
Erik Naggum  <> wrote:
|   the important distinction is between languages that drive an artificial
|   wedge between "statements" and "expressions" and languages that do not:
|   the Algol family (including Scheme) does feature this artificial wedge,
|   while the Lisp family (excluding Scheme) does not.

1. Remember that BLISS, definitely a member of the Algol family (IMHO),
   was also quite explicitly an "expression language". Every control form
   in BLISS (including loops) could deliver a value that could be used
   in any value-requiring place -- *including* the "left-hand side" of
   an assignment operator (which requires a pointer object value).
   Example legal (to the extent that I remember it correctly) BLISS:

	// for brevity, assume w.l.g. that a match will always be found
	search: begin
	        local table_structure p = table_head;
	        while .p[NEXT] neq EOL_MARKER
	        do if some_predicate(.p[ELEMENT])
	           then leave search with p
		   else p = .p[NEXT]
		end [ELEMENT] = .foo; // foo contains new value for the table

   (By the way, the value of a BLISS loop that terminates "normally"
   [without a "return" or "exit" or "leave"] was explicitly defined to
   be "-1". Often not terribly useful, but *defined*, so you could
   depend on it for a post-loop test.)

2. I strongly disagree with your assessment of Scheme in this respect.
   To me, it quite clearly falls on the "everything has a value" side
   of the line, at least as much as CL. True, for some forms the standard
   says the values are "not specified" (e.g., "set!"), but *some* value
   is required to be delivered. E.g., the following is quite legal Scheme:

	> (define foo 1)
	> (define bar 2)
	> (set! foo (set! bar 3))

   Now, exactly *what* the value of "foo" is at this point is quite
   implementation-dependent (as it is allowed to be by R5RS), but it
   definitely *has* a value. [In Elk, it's "2", the previous value of
   "bar"; in MzScheme, it's the "#<void>" object; in SCM, it's the
   "#<unspecified>" object (hah! talk about an oxymoron!).]

   I'd be interested to hear what in Scheme causes you to toss it
   so cavalierly into the non-expression-language camp.


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