Am Mittwoch, dem 29.06.2022 um 11:33 +0200 schrieb Maxime Devos:
Before commenting on the individual points, I do think in general guix
style needs to have a "lax" mode and a "strict" mode where the latter
is enabled via "--strict" and keeps certain snippets as-is. All
elements that save vertical space at the cost of horizontal space
should be disabled in strict mode, whereas they might be acceptable in
Toggle quote (10 lines)
> > (define-module (test))
> > (use-modules (guix packages) (guix git-download) (gnu packages
> > autotools) (gnu packages guile) (guix utils)
> > (define-public guile-next
> > (let ((version "3.0.7") (revision "0")
> > (commit "d70c1dbebf9ac0fd45af4578c23983ec4a7da535"))
> Conventionally 'revision' is put on another line -- for these kind of
> let bindings, (maybe all?), I would recommend to put all of them on
Toggle quote (12 lines)
> > (name "guile-next-styleme")
> > (version (git-version version revision commit))
> > (source [snip, LGTM])
> > (substitute-keyword-arguments (package-arguments guile-3.0)
> > '%standard-phases) `(modify-phases ,phases
> Put %standard-phases on the same line ad #:phases phases and `(modify-
> phases ,phases on a new line
Agree. What's even the point the current style tries to make?
I'd prefer if strict mode typed those out, but we can keep strings "as-
is" in lax mode, supposing they don't grow beyond the horizontal limit.
It can still do better by not contracting them imho.
Here, it depends. I think I'd write this as
(modify-inputs (package-native-inputs guile-3.0)
(prepend autoconf automake libtool
I think some people might actually be okay with a few or even all of
them (juding by how many submit collapsed lets), but I'd like to point
out that they break with Lisp coding guidelines for no good reason.
Regarding the optimization of vertical space, I do think that guix
lacks semantic information to make meaningful choices and thus ought to
either step back when an "informed" user invokes the tool or strictly
take the "least optimal, but correct" approach in strict mode.