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

Re: perhaps I've missed something ...

This page is part of the web mail archives of SRFI 17 from before July 7th, 2015. The new archives for SRFI 17 contain all messages, not just those from before July 7th, 2015.



At 3:01 PM -0800 1/20/00, Per Bothner wrote:
John Clements <clements@xxxxxxxxxxx> writes:

 > ps. Since I am using a fixed-width font, I can see that the second
 > one is actually two characters shorter.

But that's hardly the point, is it?  If we were into counting
characters, we'd be using APL (or J or C).  The point is economy
of concepts.

At the risk of quote-snipping too aggressively, I think that this remark most aptly characterizes our difference in opinion. You believe that an "economy of concepts" may be achieved by merging set! and set-car!. I believe that this is fundamentally misleading.

At 3:01 PM -0800 1/20/00, Per Bothner wrote:
 Semantically:
        (set! x v)
is arguably syntactic sugar for:
        (set! (the-evironment 'x) v)

If this were the case, then set! could presumably operate on any environment, and not simply the current one. The result, essentially, is dynamic scoping. This would move Scheme ... well, back about twenty years.

I claim that rather than a first-class entity, the environment is more or less an implementation detail; the clearest model to use in teaching programming is that of algebra, and application by substitution. The environment happens to be the easiest way to implement that behavior. set! changes a binding; set-car! changes a value.

john