public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFC] Increase libstdc++ line length to 100(?) columns
@ 2020-11-26 23:50 Jonathan Wakely
  2020-11-27  2:45 ` Liu Hao
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Jonathan Wakely @ 2020-11-26 23:50 UTC (permalink / raw)
  To: libstdc++; +Cc: gcc

I've touched on the subject a few times, e.g.
https://gcc.gnu.org/pipermail/gcc/2019-December/230993.html
and https://gcc.gnu.org/pipermail/gcc/2019-December/231013.html

Libstdc++ code is indented by 2 columns for the enclosing namespace,
usually another two for being in a template, and is full of __
prefixes for reserved names. On top of that, modern C++ declarations
are *noisy* (template head, requires-clause, noexcept-specifier, often
'constexpr' or 'inline' and 'explicit', and maybe some attributes.

All that gets hard to fit in 80 columns without compromising
readability with line breaks in unnatural places.

Does anybody object to raising the line length for libstdc++ code
(not the rest of GCC) to 100 columns?

Please read my replies in the thread linked above before telling me
that the code should be split up into smaller functions to avoid deep
nesting. The function I pointed to cannot easily be split up without
making the code slower to compile and potentially slower to run:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libstdc%2B%2B-v3/include/bits/stl_algobase.h;h=a2fd306e6d0cca579b510148ba1a7089e2b2f3a2;hb=HEAD#l1499


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-12-03 12:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 23:50 [RFC] Increase libstdc++ line length to 100(?) columns Jonathan Wakely
2020-11-27  2:45 ` Liu Hao
2020-11-27  8:14   ` Richard Biener
2020-11-27  8:21     ` Ville Voutilainen
2020-11-27  9:49     ` Liu Hao
2020-11-27 10:13       ` Ville Voutilainen
2020-11-27 11:08 ` Allan Sandfeld Jensen
2020-11-29 17:38   ` Florian Weimer
2020-11-29 18:51     ` Allan Sandfeld Jensen
2020-11-30 15:47       ` Michael Matz
2020-11-30 16:28         ` Allan Sandfeld Jensen
2020-11-30 16:44           ` Michael Matz
2020-12-03 12:11     ` Richard Earnshaw
2020-11-27 21:46 ` Ed Smith-Rowland
2020-11-28 12:16 ` Thomas Koenig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).