From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: max line length Date: Tue, 19 Apr 2022 09:38:00 +0300 Organization: Tidorum Ltd Message-ID: References: <625ddf23$0$26323$426a34cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Cd+XHW3N5Sxj0bUhgcBawgp93IBX2pglyvHU+F7ISxNnC+g0BD Cancel-Lock: sha1:w3tg73pnBqH6rYsjjkkY6LI50oo= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Content-Language: en-US In-Reply-To: <625ddf23$0$26323$426a34cc@news.free.fr> Xref: reader02.eternal-september.org comp.lang.ada:63759 List-Id: 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.