[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] define-record-type queries
- To: "Aaron W. Hsu" <arcfide@x>
- Subject: Re: [Scheme-reports] define-record-type queries
- From: Andre van Tonder <andre@x>
- Date: Thu, 5 May 2011 14:34:36 -0400 (EDT)
- Cc: "scheme-reports@x" <scheme-reports@x>
- In-reply-to: <op.vu0r53o40p3ku8@localhost>
- References: <BANLkTin6CTEuUN6q=+f6igLT-KQ=N1d1Fw@mail.gmail.com> <Pine.SOC.4.64.1105051014230.19410@oow.het.brown.edu> <op.vu0kyfdo0p3ku8@localhost> <Pine.SOC.4.64.1105051143480.19605@oow.het.brown.edu> <op.vu0r53o40p3ku8@localhost>
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
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports