Subject: Re: bug#60225: [PATCH] records: match-record supports specifying a different variable name.

From: Ludovic Courtès <[email-masked]>
Date: Wed, 21 Dec 2022 23:15:57 +0100

Hi,

Attila Lendvai <[email-masked]> skribis:

> An example:
>
> (match-record obj <my-type>
>   (field1 (field2 custom-var-name) field3)
>   ...)

Nice!  It looks like a useful extension to me.

> -      ((_ record type (field rest ...) body ...)
> -       #`(let-syntax ((field-offset (syntax-rules ()
> +      ((_ record type ((field-name variable-name) rest ...) body ...)
> +       #'(let-syntax ((field-offset (syntax-rules ()

I’d just drop ‘-name’, it’s all names anyway.  :-)

Could you also add a test in ‘tests/records.scm’ next to the others?

TIA,
Ludo’.