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

Re: [Scheme-reports] 5.4 record type definitions



[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