comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: max line length
Date: Tue, 19 Apr 2022 09:38:00 +0300	[thread overview]
Message-ID: <jc73m8F36cpU1@mid.individual.net> (raw)
In-Reply-To: <625ddf23$0$26323$426a34cc@news.free.fr>

On 2022-04-19 0:58, Thomas wrote:
> hi :-)
> 
> 
> how do you set your max line length?
> 
> using indentations a lot, i find that 80 is short.


I limit lines to 80 characters, because I very often want to use a 
side-by-side diff of file versions, which means having a window wider 
than two line-lengths. Text in a 170-character-wide window is still 
readable, but wider ones are not, for me as an older guy with stiff 
eye-lenses.

To make do with 80-character lines, I often use local or partial 
use-clauses, and I divide long calls across many lines, usually having 
only one parameter per line. By a "partial use clause" I mean, for 
example, "use Interfaces", when I really need to use Interfaces.C, so I 
still have to qualify with "C.zzz" but not with "Interfaces.C.zzz".

I also group subsystems into package families (parent and child 
packages) which means that the children can directly use parent-declared 
identifiers without qualification.

Other means to keep lines short include using a small indentation step 
(I now use 3 spaces, but I'm considering changing to 2 spaces) and 
keeping subprograms short, which also helps the readability.

  reply	other threads:[~2022-04-19  6:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18 21:58 max line length Thomas
2022-04-19  6:38 ` Niklas Holsti [this message]
2022-04-21 23:34   ` Stephen Leake
2022-04-22  7:57     ` Randy Brukardt
2022-07-05 15:22   ` Thomas
2022-04-19 19:30 ` Jeffrey R.Carter
2022-07-06 10:35   ` Robin Vowels
2022-04-19 20:07 ` Dmitry A. Kazakov
2022-07-05 14:59   ` Thomas
2022-04-21 23:31 ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox