[R6RS] Question on inheritance vs. record-type predicates

William D Clinger will at ccs.neu.edu
Wed Mar 21 09:14:09 EDT 2007

Mike wrote:

> Way back, Pavel Curtis wrote on a possible implementation strategy for
> record-type predicates in the presence of single inheritance:
> http://www-swiss.ai.mit.edu/ftpdir/scheme-mail/HTML/rrrs-1988/msg00164.html
> It seems to me, we're basically precluding this strategy by assigning
> immediately subsequent indices to the fields.  Is this a problem?

I don't think it's a problem.  By modifying Pavel's
strategy to keep a vector of rtds in slot 0, which
adds one level of indirection, you can still do the
test in constant time.  Larceny's records have been
using this trick for about ten years, and adding the
R6RS semantics to Larceny's existing records looks
like a fairly straightforward (albeit spectacularly
ugly) modification.


More information about the R6RS mailing list