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

compiler environment, how best to isolate side effects



Your "C-property" stuff is an implementation-oriented description of
what I referred to as a "subjunctive environment".  Contrary your mail,
what Hedrick said is NOT a "reasonable argument against" this.  In
Hedrick's system, macros were placed into the subjunctive environment,
but functions were not.  That's why users were confused no end.  Had
everything been put into the sujunctive environment, it would have
worked fine.

The Symbolics system right now is like what Hedrick describes, except
that EVAL-WHEN is available.  So users can carefully put EVAL-WHEN's
around functions that are needed in the subjunctive environment, so that
the macros that call them will work.  Unfortunately, (1) you have to
remember to put in the EVAL-WHEN's, and understand what they mean, and
(2) when you do compile-file, the function is left around in your Lisp
environment.  While I haven't seen a lot of evidence of confused users,
I agree that this is the sort of thing I'd expect to confuse people,
since it's rather subtle.  Doing the "subjunctive environment" would
make everything work right without muss or fuss.  We would have done
it by now except that it's so hard to implement in this architecture.

I'm getting pretty close to agreeing that this isn't something we can
tackle easily by simply dictating a behavior in CLtL.  Instead we'll
have to come up with one or two conventions so that portability can be
achieved.