Hi Kevin, On 2026-03-14T18:47:18+0800, Kevin J. McCarthy wrote: [...] > > ColumnLimit: 80
+1
[...]
> > SpaceAfterCStyleCast: true
+1
> I think this is generally the case in the mutt code but it's not uniform. I
> don't insist on this one. Definitely open for discussion.
I find it easier to grep(1) for casts when they are consistently
followed by a space. Otherwise, (type) is just too common to
distinguish a cast from something else. And it's certainly useful to be
able to grep(1) for casts, given they're among the most dangerous
features in the C language.
> > IndentGotoLabels: false
+1
> There are both styles in the code. Also definitely open for discussion.
>
> > KeepEmptyLines:
> > AtEndOfFile: false
> > AtStartOfBlock: false
> > AtStartOfFile: false
>
> It seems like a good idea? Please say something if in your experience this
> isn't.
It sounds reasonable.
> > AlignAfterOpenBracket: Align
>
> This is generally the case in the Mutt code. I think overall it looks nice,
> but there is the trade-off with long function names and/or deep indention
> where parameters start to not all fit within 80 columns.
I tend to prefer manual adjustment of this. Most of the time, it's
reasonable to use the automatic alignment, but every now and then I
decide to differ for some reason.
> > SpaceBeforeParens: Always
>
> I know this one is controversial. It took me a while to get used to the
> function definition and declaration style in Mutt. It's not very standard,
> so I'd appreciate some other viewpoints, but let's not get bogged down on
> this one, okay? I'm most likely not up for changing it unless I hear
> old-time devs chime-in against it too.
>
> Anything else I missed or you see that's a bad idea? Please speak up. Thank
> you.
I dislike this. It becomes especially bad when nesting calls. Here's
for example some code I had to write for GCC, and how I would have
written it without the mandatory spaces:
_Generic (typeof (_Maxof (const int)), int: 0);
_Static_assert (_Maxof (unsigned _BitInt (5)) == 31);
vs
_Generic(typeof(_Maxof(const int)), int: 0);
_Static_assert(_Maxof(unsigned _BitInt(5)) == 31);
The argument list is fundamentally attached to the function, and the
lack of space makes that more evident to the eye. That separate (5)
seems lost, where it is in reality the argument of _BitInt().
Have a lovely day!
Alex
--
<https://www.alejandro-colomar.es>
signature.asc
Description: PGP signature
