[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Proposal for Environments in Scheme

Jonathan says, ``In particular, one should be able to modularize one's programs
without having to resort to a side-effecty style.''

I want to point out that the proposal I presented does not required any use at
all of the environment-manipulation facilities except for MAKE-ENVIRONMENT and
ENVIRONMENT-REF.  The other procedures are not provided for conventional use of
the facility but rather for more meta-level programming, such as a portable
interpreter or inspector.  None of the programs written in Cedar Scheme use the
other environment-manipulation procedures at all.

As for block compilation, the same kinds of optimizations can be applied here in
those cases where a new environment is being used for the file (the usual case).
All unexported names are entirely internal to the file and calls between them
can be optimized arbitrarily, in precisely the same way as the block compilation

I, also, would like an official way to specify interfaces (though I disagree
that they must simply be lists of names; Scheme is *not* untyped, it is not
*statically* type-checked, a big difference).  This is no harder or easier with
the proposal I gave than with any other set-up.  One simply makes some
declaration about the names visible in the environment bound to a certain
identifier in a certain environment.  No facility can do any more than that and
it's clearly as feasible in our proposal as anywhere.

Jon, could you be more concrete about what kind of system you envision?  I'm not
asking for a complete proposal, but perhaps a small motivating example in the
style of your early system would be possible.  I'd like to understand the issues
that you perceive.