unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Relocating some procedures into (guix utils)
@ 2023-01-21  0:14 Bruno Victal
  2023-02-25 17:37 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Bruno Victal @ 2023-01-21  0:14 UTC (permalink / raw)
  To: guix-devel; +Cc: mirai

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)
* list-of, interpose, alist?, list-of-string? from (gnu services configuration)

The procedures above are general enough and it's not hard to imagine that some of these could be useful in package definitions.


Cheers,
Bruno


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Relocating some procedures into (guix utils)
  2023-01-21  0:14 Relocating some procedures into (guix utils) Bruno Victal
@ 2023-02-25 17:37 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2023-02-25 17:37 UTC (permalink / raw)
  To: Bruno Victal; +Cc: guix-devel

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’.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-25 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-21  0:14 Relocating some procedures into (guix utils) Bruno Victal
2023-02-25 17:37 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).