[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56799: (gnu services configuration) usage of *unspecified* is proble
From: |
Maxim Cournoyer |
Subject: |
bug#56799: (gnu services configuration) usage of *unspecified* is problematic |
Date: |
Sat, 13 Aug 2022 22:57:05 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
Hi Attila,
Attila Lendvai <attila@lendvai.name> writes:
[...]
>> prepare a patch for the other things mentionned here (an exported
>> symbol).
Thanks!
> i started implementing your suggestions, including the replacement of
> the scattered usage of (eq? 'unset ...) pattern. what i found is that
> the code is not very readable using MAYBE-VALUE-SET?, or at least not
> for me.
>
> first, it negates the boolean logic everywhere in the current code
> (i.e. larger diff, and/or the use of (if (not ...) a b)).
>
> and an example wrt readability:
>
> (if (maybe-value-set? field-default)
> field-default
> (configuration-missing-default-value ...)
>
> a value is never set, only places can be set to some value.
It's not clear to me why you think the above is less readable; in the
code I had to touch, the maybe-value-set? was more natural, as the cases
I dealt with often tested for (not (eq? 'unset ...)), so reversing the
logic allowed getting rid of the negation. See
https://issues.guix.gnu.org/57168#13 for example.
>
> would you be fine if we renamed MAYBE-VALUE-SET? to UNSET-VALUE?
unset-value? sounds like an action; so I'd name it 'maybe-value-unset?';
but as I wrote above I don't really see the benefit/like the idea.
Thanks for working on it!
Maxim
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, (continued)
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Maxim Cournoyer, 2022/08/02
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Ludovic Courtès, 2022/08/04
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Ludovic Courtès, 2022/08/07
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Attila Lendvai, 2022/08/08
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Attila Lendvai, 2022/08/08
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Maxim Cournoyer, 2022/08/09
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Maxim Cournoyer, 2022/08/09
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Attila Lendvai, 2022/08/11
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Maxim Cournoyer, 2022/08/13
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Attila Lendvai, 2022/08/13
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic,
Maxim Cournoyer <=
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Attila Lendvai, 2022/08/16
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Maxim Cournoyer, 2022/08/17
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, (, 2022/08/17
- bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Maxim Cournoyer, 2022/08/09
bug#56799: (gnu services configuration) usage of *unspecified* is problematic, Maxim Cournoyer, 2022/08/01