Subject: Re: Separation in function and value cells (was Re: newbie: please don't smash my case)
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 2000/07/10
Newsgroups: comp.lang.lisp
Message-ID: <8kbhvm$3iqif$1@fido.engr.sgi.com>
Joe Marshall  <jmarshall@alum.mit.edu> wrote:
+---------------
| Kent M Pitman <pitman@world.std.com> writes:
| > but as a practical convention, good programmers just don't ever FLET
| > or LABELS definitions that are globally defined.  So when you see a
| > function that looks like it's doing a certain function call, it generally
| > is.  Not so at all in Scheme.
| 
| Not true.  Good Scheme programmers don't shadow global variables any
| more capriciously than good lisp programmers.
+---------------

Joe, I really *like* Scheme, and I write much more of it than CL, but I
have to agree with Kent (and from previous comments, Erik) on this one.

In Scheme you have to be a *lot* more careful to avoid shadowing global
variables, because *all* of the standard functions are global "variables".
Not only can one not safely use "list" as a local variable, you can't use
"string" or "vector" or "min" or "max" -- or for that matter, "quotient",
"remainder", "real-part", "magnitude" or "angle"!! A *lot* of names that
are natural choices for intermediate-result are denied to the programmer,
because Scheme, a Lisp1, chose to give builtin functions those names.

IMHO, the situation would be far worse did not Scheme use the "?" suffix
convention for predicates and the "!" suffix for mutators. OTOH, that hack
denies all such potential variable names to programmers as well, since one
must assume that someday *somebody* might want to name a function with one
of those.


-Rob

p.s. And while we're making comparisons... nah, never mind, don't get me
started about how in Scheme "length" is not generic...

-----
Rob Warnock, 41L-955		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		PP-ASEL-IA
Mountain View, CA  94043