guix-devel
[Top][All Lists]
Advanced

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

Re: Regarding the vertical alignment in the record definitions


From: Maxim Cournoyer
Subject: Re: Regarding the vertical alignment in the record definitions
Date: Thu, 05 Dec 2024 16:13:00 +0900
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Tomas,

Tomas Volf <~@wolfsden.cz> writes:

> Hello Guix,
>
> I would like to bring up for debate the convention the project has of
> vertically aligning the record definitions.

I don't think that's a project convention.  It's more like it's a
convention of some individual in the projects :-).  At least I don't
follow it, except sometimes when touching a piece of code already
indented that way.

> While some amount of noise in diffs is expected in any lisp language
> (the trailing `)'), the vertical aligning makes it worse.  It (in my
> opinion) complicates both reviewing and re-basing (due to merge
> conflicts).
>
> For example, take this patch I sent today.  It adds *a single field* to
> the record.  However the patch (that someone needs to review and make
> sure is correct) looks like this:

I agree it's a bit tedious, both manually and also in diffs.  My
personal preference is to leave just one space between the field name
and the value, that also holds for variable bounds in lets, etc., to
avoid the problem (at the cost of some visual clarity, I guess).

One day maybe we'll have a general tool like 'scheme-fmt' to run on a
file save hook that'd fix the format question for good, like Python has
with 'black' or 'ruff', etc.  I have on mind to work on such a tool, but
it's low in the list.

-- 
Thanks,
Maxim



reply via email to

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