[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] 5.4 record type definitions
- To: Andy Wingo <wingo@x>, scheme-reports@x
- Subject: Re: [Scheme-reports] 5.4 record type definitions
- From: Alaric Snell-Pym <alaric@x>
- Date: Mon, 23 May 2011 12:58:26 +0100
- In-reply-to: <m3aaedr6rx.fsf@unquote.localdomain>
- References: <m3boyy7jio.fsf@unquote.localdomain> <4DD54A03.7000904@snell-pym.org.uk> <m3k4dm2xw1.fsf@unquote.localdomain> <4DDA326F.2030605@snell-pym.org.uk> <m3aaedr6rx.fsf@unquote.localdomain>
[brought back to list... O, for Reply-To munging!]
On 05/23/11 12:33, Andy Wingo wrote:
> On Mon 23 May 2011 12:09, Alaric Snell-Pym <alaric@x> writes:
>
>> On 05/19/11 22:17, Andy Wingo wrote:
>>
>>> (define-record-type <foo>
>>> (make-foo)
>>> foo?)
>>>
>>> <foo> => ?
>>
>> That's up to the implementation! If the implementation doesn't have a
>> record type descriptor, or some magic syntactic binding or something to
>> put there, it might choose to put the symbol that names the record type,
>> I reckon.
>
> I guess my question is, may evaluating it raise an error?
>
> That would indeed be the case if define-record-type included something
> like:
>
> (begin
> ...
> (define rtd ...)
> (define-syntax <foo>
> (syntax-rules (my-secret-token)
> ((_ my-secret-token) rtd)))
> ...)
I think it's fine for it to raise an error. Portable code shouldn't be
poking into what it's bound to, unless it also depends on something else
(eg, a record inheritance facility that exposes its implementation
sufficiently) that explicitly gives it a semantics!
> Andy
ABS
--
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports