Hi,

On 3/30/22 09:28, Andy Wingo wrote:

Too bad about all that other crap about checking whether the index is in
range and the field is boxed or not, though :-/  Probably there is a
better design...

Andy

For the index-out-of-range part, when I saw `record-accessor`, I thought of it as similar to Racket's `make-struct-field-accessor`[1], which can check the index just once, when the accessor is created, rather than each time the accessor is used. That's (part of) what Racket's `struct` form expands to.

Would it be reasonable to use `record-accessor` in the implementation of SRFI 9?

-Philip

[1]: https://docs.racket-lang.org/reference/creatingmorestructs.html#%28def._%28%28quote._~23~25kernel%29._make-struct-field-accessor%29%29

Reply via email to