Re: What's your maximum line size preference?
On Oct 15, 3:04 pm, blargg....@gishpuppy.com (blargg) wrote:
In article <1224061250.227...@irys.nyx.net>, ytrem...@nyx.nyx.net (Yannic=
k
Tremblay) wrote:
[...]
Don't get me wrong. The huge majority of my code is less
than 80 chars. I do appreciate narrow simple lines. Just
that I dislike a hard rule that nothing should ever be wider
than 80 chars because IMO it is outdated and results in
lower readability.
If the huge majority of your code's lines are less than 80
characters, how could limiting those few other lines make a
big impact on readability?
Having made a very strong statement in favor of a hard limit,
I'll now take the other side: there have been a few times when
I've been very tempted to violate the limit, sometimes by a lot.
The most frequent case is statically initialized tables: it
would be very nice (and much more readable) if I could make each
line in the table a line in the source code.
[...]
I prefer guidelines with judgement applied.
I agree; guides, not hard rules (in most cases).
Rule 0 of any guidelines: any other rule in the guideline can be
violated with sufficient motivation. Typically, in a larger
organization, it will mean that you'll have to get it signed off
by your boss, or the architecture team, or someone in Q&A; in
more typical orgainizations, all it really means is that you'll
have to defend it in code review, and convince the reviewers.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34