[r6rs-discuss] [Formal] Datum values, shared structure and eq?
mti at tillenius.com
Thu Feb 22 06:03:32 EST 2007
Michael Sperber wrote:
> Mikael Tillenius <mti at tillenius.com> writes:
>> Description: The description of datum values in section 1.9 doesn't
>> forbidd shared structure. For example would the value of "(let ((x
>> (cons (cons 1 2) 3))) (set-cdr! x (car x)) x)" return a datum value? I
>> assume the answer i "no" but it would be nice to make it
> This is the tutorial introduction, where `set-car!' isn't even
But we cannot ignore the fact that "set-car!", "vector-set!" and "eq?"
are part of the languge.
> Moreover, this section is quite explicit (in the first two
> sentences) about the fact that no complete characterization is given here.
I assume you mean the first two sentences of section 1. What confuses me
is that I can find no definition of what a datum value is outside of
subsection 1.9. I assume that the set of datum values is the set of
values that can be represented by some syntactic datum. The value of "x"
in my example above would in fact be a datum value, the same datum value
that would be represented by "((1 . 2) . (1. 2))". Is this correct?
Ok, it all makes sense as far as datum values are concerned. I'm still
not sure exactly when a "value" is something abstract and when it is
something more concrete with an identity that can be tested with "eq?" I
will reread the report with this in mind...
Btw, I really like the introduction of datum values. I think earlier
revisions of the report was a bit unclear about if Scheme programs were
sequences of characters (as implied by the grammar) or S-expressions (as
implied by e.g. macros).
More information about the r6rs-discuss