guix-devel
[Top][All Lists]
Advanced

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

Re: Divvying up service definitions


From: Attila Lendvai
Subject: Re: Divvying up service definitions
Date: Sat, 28 Oct 2023 09:11:54 +0000

> I dont think there's any problem wrt categorization. For your Kerberos
> example, either would be fine as they're not mutually exclusive.
> (though I'd lean towards 'authentication' here)

sure, but the crux of the issue here is how to improve code readability; i.e. 
would it make the humans working on the Guix codebase more effective.

if all the 3 options are equally reasonable, then some people will have to 
check two places before they find it in the third.

with such a codebase people will develop a habit of just using multi-file grep 
to find stuff... which is arguably a better strategy to begin with.

and it's worth pointing it out here that following grep'able patterns like 
`define.*kerberos` highly facilitates code navigation, and especially so for 
newcomers. this is one of the features of lisp(ers) that i badly miss in many 
other languages/cultures. and arguably, this is much more important than the 
placement of the definitions.

and while i'm ranting, another useful strategy is to give unique names to 
abstractions, and make sure that wherever these abstractions are employed, that 
name shows up in the source code; i.e. it can be grap'ped. IOW, names should 
not be e.g. programmatically assembled in DWIM'ish ways, unless it is a 
frequent enough pattern that the loss of grep'pability is worth it. or 
abstractions should not be hidden behind late binding, unless it's worth the 
additional loss of code readability.

ultimately, definitions shouldn't live in text files, but in a source code 
database, with proper search and projection tools in the editor (and the DVCS) 
that understand the graph nature of the source code. that would make this 
entire discussion moot, but we're not there yet.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“The meeting of two personalities is like the contact of two chemical 
substances: if there is any reaction, both are transformed.”
        — Carl Jung (1875–1961)




reply via email to

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