[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.

John Clements <clements@xxxxxxxxxxx> writes:

> You believe that an "economy of concepts" may be achieved by merging
> set!  and set-car!.  I believe that this is fundamentally misleading.

To clarify:  I don't think merging set! and set-car! *per se*
leads to "economy of concepts".  However, it may be a more economical
way to *organize* the concepts.

Alternatively, one can argue it requires one big new concept
"location" (or lvalue if you prefer) (which is implicit in the
semantics anyway); once you have that concept, it unifies or
simplifies a lot of getter/setter pairs, which leads to fewer concepts

I don't think it makes much difference either way formally.
The question is which style is more natural in practical use
I can see this is largely a matter of taste and personal preference.
And a matter of different cultures.

> If this were the case, then set! could presumably operate on any 
> environment, and not simply the current one.

I was trying to make the point that the two forms of set! are
related, not give the semantics of anything.

> 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.

Except the top-level environment, which R5RS at least suggests (but
does not require) be a first-class entity.
	--Per Bothner
per@xxxxxxxxxxx   http://www.bothner.com/~per/