guix-devel
[Top][All Lists]
Advanced

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

Re: Layout of ‘define-configuration’ records


From: Maxim Cournoyer
Subject: Re: Layout of ‘define-configuration’ records
Date: Fri, 25 Nov 2022 10:15:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:

[...]

>> Ah!  Thanks for pointing my silly mistake.  Then the argument would
>> become... if it's good for define-configuration, it should have been
>> good for define-record-type* the same (why the discrepancy?).
>
> ‘define-record-type*’ is generic; there’s no reason for it to add a
> ‘location’ field.
>
>> After your new documentation in place to guide users to DTRT with
>> regards to matching records, if you think %location should be the first
>> field, then we should make it so in both instances, perhaps?
>
> ‘%location’ only appears in ‘define-configuration’; what did you mean by
> “both instances”?

Hmm, that's right.  Nevermind, I thought the later had a %location
"special" field too.

>> Oops!  Another point to add to our future coding style guidelines :-).
>
> In the end, I guess the lesson is that, indeed, not all the design
> choices and rationales are properly documented.  That’ll always be the
> case to a large extent though, so changes “close to the core” require
> more careful review and discussion to fully understand the implications
> of the change—it might look innocuous but have broader implications than
> expected.

Agreed.  I'll try to make better use of the etc/teams.scm script in the
future to ping the right people for such changes.

-- 
Thanks,
Maxim



reply via email to

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