[Top][All Lists]

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

Re: better error messages through assertions

From: Ludovic Courtès
Subject: Re: better error messages through assertions
Date: Tue, 05 Apr 2022 14:04:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)


Philip McGrath <> skribis:

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

Yes, or in (guix records).

Medium-term, I thought we could rebase (guix records) on Guile records
with an eye on adding support for inheritance.  So perhaps we could do


reply via email to

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