[Top][All Lists]

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

Re: better error messages through assertions

From: Philip McGrath
Subject: Re: better error messages through assertions
Date: Fri, 1 Apr 2022 15:28:00 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0


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...


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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]