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

Re: [Scheme-reports] define-record-type queries

On Thu, 5 May 2011, Aaron W. Hsu wrote:

> On Thu, 05 May 2011 11:52:56 -0400, Andre van Tonder <andre@x>
> wrote:
>> If an implementation compares field names using eqv? when coming up with
>> the constructor definition, the above will fail.  If it compares them as
>> identifiers (using bound-identifier=?) the constructor definition will
>> succeed fine.
> *sigh* It appears that you are right here. On the other hand, I would
> argue that you can't possibly justify a symbolic semantics here because of
> this very situation: it's just incorrect. I suppose that in much of this,
> when I am reading the standard, if it says that a field name is an
> identifier, I take that to mean an identifier, with all of the associated
> lexical information that goes with an identifier, I would argue that you
> cannot read <field name> in the definition of define-record-type as a
> symbol, and therefore it would be simply incorrect to test equality of two
> identifiers (which are not symbols) using eqv? in this case.

I agree with you, but it may still be a good thing to explain this a little
better somewhere in the doc.  For example, if you are right, the reference 
implementation of SRFI-9 uses an incorrect approach because it compares field 
tags as symbols.

(Ignoring for now the fact that it doesn't create a new type either.)

Scheme-reports mailing list