Subject: Re: Environment model of evaluation [was: Re: The Scheme FAQ]
From: (Rob Warnock)
Date: 10 Aug 2001 09:18:14 GMT
Newsgroups: comp.lang.scheme
Message-ID: <9l08sm$a83pn$>
Eric Dahlman  <> wrote:
| Bill Richter <> writes:
| > But I'm not convinced that I have to believe that (cons 1 2) returns a
| > pointer to a pair of pointers to 1 & 2.
| Part of the confusion arises from thinking of a cons cell as an ordered
| pair, (a b), when mathematically it is a triple (a b i) where i is an
| element of an index set.  It is this last element which actually
| defines the identity of a given cons.

And in terms of my parallel reply to Bill, Eric's index element "i" could
be thought of as an "object designator" for that cons.

In one of the footnotes of my reply, I mentioned that the "values" or
object designators in a Scheme implementation might be (relatively)
small integers which indexed a global object table (as is done in some
Smalltalks). In such an implementation, the test for "object identity"
is simply a test for equality of the index.

But an interesting implication of Eric's answer is that the index set
might be more complex. For example, if a Scheme "value" (or object
designator) is drawn from the cross-product of the set of Scheme
types and the set of non-negative integers or indices, then object
identity would require that both the type *and* the index be the same.

This is not a completely impractical suggestion. If the type is
represented in the machine as a small integer, then a Scheme value
could be represented as the concatenation of the type index and
an index-within-type. Except for inverting the order of indirection
(type->address, rather than address->type), this is essentially the
same as the classic "BiBOP" scheme.


Rob Warnock, 30-3-510		<>
SGI Network Engineering		<> [until 8/15]
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA