[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Relocating some procedures into (guix utils)
From: |
Ludovic Courtès |
Subject: |
Re: Relocating some procedures into (guix utils) |
Date: |
Sat, 25 Feb 2023 18:37:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
Bruno Victal <mirai@makinata.eu> skribis:
> IMO there are some procedures (or even modules) that could be relocated into
> (guix utils) as their utility is more general than what their module names
> would suggest.
>
> Good candidates to relocate into (guix utils):
> * (gnu home services utils)
Hmm, not sure.
> * list-of, interpose, alist?, list-of-string? from (gnu services
> configuration)
I think it’s fine to keep them over there. :-)
The rationale is that one Shouldn’t™ be using things like ‘alist?’ and
‘list-of-string?’ in “real code”: they have linear complexity (like
‘list?’), they might be ill-defined, and we don’t generally write
polymorphic code anyway.
They *are* useful though as a limited form of contracts for
‘define-configuration’ fields, so it’s good to keep them there.
Taking a step back, my inclination is to keep things local, or even
private, until/unless there’s clear evidence of (1) usefulness beyond
their initial place of birth, and (2) the interface is “clean” enough
for them to be promoted. #2 is subjective, so it’s really on a
case-by-case basis.
My 2¢!
Ludo’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Relocating some procedures into (guix utils),
Ludovic Courtès <=