Hacker News new | ask | show | jobs
by sigzero 1837 days ago
I hate that formatting style personally.
3 comments

> First off, I’d suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it’s a great symbolic gesture.

- The doc on Linux kernel coding style

Me too. I've never understood it. I just went back through the clang-format documentation and looked at some of the examples for the GNU style and was reminded at how utterly unreadable the resulting code is.
The rationale for this style seems to be to make it appealing to Lisp programmers, which will find it familiar.

I also dislike it for C (as much as I appreciate GNU's contribution). As we all know, K&R is the one true style.

Nah, "utterly unreadable" is the right description.
I've not written a lot of lisp (I understand it, just never had a need for it personally) so perhaps I'm ignorant, but I don't see how it's at all similar to Lisp. It just looks different for the sake of being different.
I never worked in a codebase that was formatted in this style and surely its weird and not at all what I am used to. But I somehow from looking at the examples find it to be somewhat pleasant. Doesn't mean I would pick it as my standard but I can see how one could.

I do prefer putting opening braces at the line end in all situations though (but that also rules out a lot of other styles).