[R6RS] record types and UIDs
Michael Sperber
sperber at informatik.uni-tuebingen.de
Sun Feb 26 10:06:34 EST 2006
Matthew Flatt <mflatt at cs.utah.edu> writes:
> This is a great example (thanks!), but it convinces me of the opposite
> conclusion: that UID prefix is really much better than a UID.
>
> I agree with the need for good error messages. I imagine that the above
> situation would be handled the same was as for non-UID record types;
> the error message should be something like
>
> posn-x: expects args of type <record:posn>; given instance of a
> different <record:posn>
>
> Is there some reason why this strategy doesn't work with
> UID-prefix-based record types?
I'm confused---the only way you could get to that point would be by
overriding the record type with the old UID. So you've done something
rather explicit, which alerts you to the possibility of that
happening. Moreover, since you've overridden the old one---if your
implementor cares about good error messages, his system can mark the
old record type as "deprecated" or something, and the error message
could read:
posn-x: expects args of type <record:posn>; given instance of an
obsolete version of <record:posn>
which would help a bit.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
More information about the R6RS
mailing list