Hacker News new | ask | show | jobs
by pbw 2208 days ago
I'm confused. This page [1] claims to be the "Linux kernel coding style" and it says "The limit on the length of lines is 80 columns and this is a strongly preferred limit". So he's reversing that without actually updating the guide? And without setting a new limit? He implies maybe "100" is a good limit but maybe "142" is even better? Weird.

I know he's primarily talking about terminal output not code, but he implies it's for code too "and our source code is fundamentally wider as a result". Seems like a very sloppy transition of a huge project to a new vague standard? I'm not impressed the clarity here.

[1] -https://www.kernel.org/doc/html/v4.10/process/coding-style.h...

2 comments

The discussion was originating from this patch:

https://lkml.org/lkml/2020/5/28/78

https://lkml.org/lkml/2020/5/28/1237

Although you're right that his comment made the coding standard ambiguous, I found myself agreeing with Linus in this particular case. What we need to do often in a large C project is to grep some function prototype against the source tree, and it sucks if it's wrapped like this.

I believe they are talking about existing code - i.e. Linus does not want patches to re-wrap existing long lines just to get them under 80.

For new code 80 columns is still the recommendation, unless this discussion causes that to be changed.