Re: Miscellaneous comments
taylanbayirli@xxxxxx 16 Aug 2015 16:29 UTC
John Cowan <xxxxxx@mercury.ccil.org> writes:
> Taylan Ulrich Bayırlı/Kammer scripsit:
>
>> The SRFI doesn't really use any form of inspection into record types.
>> It just piggybacks `define-record-type' to take note of the newly
>> defined data type, and create tables mapping symbols to the data type's
>> accessors and modifiers.
>
> But that's a choice made by the sample implementation. It should be
> possible to support this SRFI on top of record inspection, and the whole
> point of opaque records is that they are uninspectable, so they should
> be exempt from the requirement to support this SRFI. For example,
> ports might be implemented as opaque records, but users shouldn't be
> able to use this SRFI to see into the implementation details of ports.
Hm, I see. I will refine the specification to make it clear that if a
record type is opaque, then ref and set! should only work with the
"public API" of the type. Perhaps that warrants the addition of an API
to register getters/setters manually. Maybe such an API is a good idea
on its own merit. I'll add it.
>> (set! (~ foo car bar) quux),
>
> I like that.
Nice. I'm mostly done specifying and implementing it.
There are now two people opposing 3-argument set!. I'll wait for some
more input before removing it.
Taylan