ALU capability (was Re: [E-Lang] Authority -- what is its dual?)

Jonathan A Rees jar8@mumble.net
Thu, 18 Oct 2001 09:13:01 -0400


   From: "Jonathan S. Shapiro" <shap@eros-os.org>
   Date: Thu, 18 Oct 2001 08:14:43 -0400

   I believe that even in Scheme there is a minimal amount of stuff in every
   environment: the syntactically significant special forms. These include
   define, let, lambda, if, set!

   I've probably missed one or two, but so far as I know scheme provides no
   means to remove these from the environment.

   Jonathan Rees: if I am misinformed, I'ld very much appreciate clarification,
   as there is an interesting environment binding problem lurking in here.

Scheme 48 isn't Scheme.  It has lots of things that Scheme doesn't,
including a module system.  If you configure a Scheme 48 environment
the right way (to open the "scheme" structure and no others), you get
something that's exactly Scheme, modulo a small number of peripheral
bugs such as bit-correct floating point printing and reading.

Obviously the scheme structure isn't definable by the user.

Somewhere along the line, probably with the introduction of lexically
scoped macros and or the revised^5 report, the reserved words became
unreserved.  That is, you can now say (define if ...).  This
eliminates the need for users to remember (or even know) the reserved
words they don't use.  In fact the desire to eliminate reserved words
was a big impetus for developing lexically scoped macros in the first
place.  I know this was the intent of the authors, but I haven't
checked to see whether it made it into the report.  Module systems
take this a step further: they let Alice redefine "if" even if Bob
wants to use the built-in "if".

You're right that there's no way to remove things in Scheme, but being
able to redefine them is almost as good.  In Scheme 48 you can remove
things by simply not putting them in an environment, since the module
system is POLA-inspired.

Jonathan