Re: [Scheme-reports] define-record-type queries Aaron W. Hsu (05 May 2011 17:57 UTC)
Re: [Scheme-reports] define-record-type queries John Cowan (05 May 2011 18:02 UTC)
Re: [Scheme-reports] define-record-type queries Andre van Tonder (05 May 2011 18:35 UTC)

Re: [Scheme-reports] define-record-type queries Andre van Tonder 05 May 2011 18:34 UTC

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

> On Thu, 05 May 2011 11:52:56 -0400, Andre van Tonder <andre@het.brown.edu>
> 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
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports