On 2024-01-09 23:49:33 +0100, Ludovic Courtès wrote: > Hello! > > Tomas Volf <~@wolfsden.cz> skribis: > > > As seen in the example above, currently there is a need to manually > > merge the list of additional modules with the original one. Failing > > to use the correct base can lead to issues (like crash in netsurf). > > > > I would like to propose adding two new fields into the build system, > > `#:extra-modules' and `#:extra-imported-modules'. Those would be > > automatically appended to the `#:modules' and `#:imported-modules', > > removing the need to merge the lists in the package definition. > > Therefore the example above would turn into: > > As a rule of thumb, I personally always avoid the #:extra-things > pattern, instead letting users pass #:things in their entirety and > documenting the default value. > > I believe (1) this is clearer (when I see “extra”, I’m always like “extra > compared to what?”), and (2) it gives more control over the things in > question (since one can also remove stuff from the default value). Well you could still remove the default stuff, since the "non-extra" would not be going anywhere. > > So yes, that’s a bit more boilerplate when all you want is import one > additional module, but I think it’s overall a better interface than > #:extra. > > I hope this makes sense! I see your point. Not sure I fully agree, but do understand what you mean and will not push on it further. However even in that light, I still consider the 3 and 4 to be worth considering. Aaand even without 3, at least doing 4 in some shape or form would be in my opinion useful. Current situation is bit... copy&pasty. Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.