Poll description
There have been arguments recently that the line length is a bit too restrictive and we should change the coding style to allow for longer lines.
We currently have line length exceptions for comments and print format strings.
Arguments for longer line lengths:
- We have large monitors and can easily see more than 80 characters now.
- It’s better to just make the code look good than to worry about breaking the line up because it’s 81 characters long.
- With long Kconfig symbol names and longer, more descriptive variable names, lines have gotten longer without changing any code complexity.
Arguments for keeping 80 characters:
- If the code needs to go past 80 characters, the function is probably too complex.
- The linux kernel has an 80 character limit, and we should maintain that.
- With the existing line length exceptions, there shouldn’t be a problem.
- People already have their editors set up for 80 characters and it would be a pain to change them just for coreboot’s new settings.
- 80 is already quite long on side-by-side diff view
Argument for 96 characters:
- This is intended to be a compromise between 80 characters and even longer line lengths. The idea here is that it’s 2 tabstops + 80 text characters.
Argument for no strict line length:
- Nobody is actually advocating for super long lines - it’s just about making the code look good without actually having to worry about the line length.
- We can trust coreboot developers to be reasonable and we can catch people doing stupid things in the code reviews when they’re not.
Result
1. 96 character lines (Condorcet winner: wins contests with all other choices) |
2. 80 character lines loses to 96 character lines by 36–29 |
3. 88 character lines loses to 96 character lines by 38–20, loses to 80 character lines by 35–27 |
4. 120 character lines loses to 96 character lines by 36–23, loses to 88 character lines by 30–27 |
5. 132 character lines loses to 96 character lines by 41–20, loses to 120 character lines by 36–12 |
6. No strict length limit loses to 96 character lines by 44–20, loses to 132 character lines by 28–26 |
For simplicity, some details of the poll result are not shown.
Result details
| | 1 | 2 | 3 | 4 | 5 | 6 |
1. 96 character lines |
|
- | 36 |
38 |
36 |
41 |
44 |
2. 80 character lines |
|
29 |
- | 35 |
36 |
43 |
43 |
3. 88 character lines |
|
20 |
27 |
- | 30 |
35 |
36 |
4. 120 character lines |
|
23 |
31 |
27 |
- | 36 |
37 |
5. 132 character lines |
|
20 |
23 |
21 |
12 |
- | 28 |
6. No strict length limit |
|
20 |
20 |
25 |
21 |
26 |
- |
Ballot reporting was not enabled for this poll.
- Rank 1:
96 character lines (2): vs. 0 : (29 - 36) vs. 3 : (23 - 36) vs. 1 : (20 - 38) vs. 4 : (20 - 41) vs. 5 : (20 - 44)
- Rank 2:
80 character lines (0): vs. 3 : (31 - 36) vs. 1 : (27 - 35) vs. 4 : (23 - 43) vs. 5 : (20 - 43)
- Rank 3:
88 character lines (1): vs. 3 : (27 - 30) vs. 5 : (25 - 36) vs. 4 : (21 - 35)
- Rank 4:
120 character lines (3): vs. 5 : (21 - 37) vs. 4 : (12 - 36)
- Rank 5:
132 character lines (4): vs. 5 : (26 - 28)
- Rank 6:
No strict length limit (5): vs. 4 : (28 - 26)
Feel like voting on something else? Try one of these public polls:
Loading...