Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Which code style do you prefer the most?
Date: Sun, 09 Mar 2025 12:18:39 -0700
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <8634fmui5s.fsf@linuxsc.com>
References: <87frk10w51.fsf@onesoftnet.eu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Sun, 09 Mar 2025 20:18:41 +0100 (CET)
Injection-Info: dont-email.me; posting-host="4ff405040ba6608b59b6d53fd95025b0"; logging-data="946092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/u0u5gFkVKnQb8GfzzO1WsTrzs2hqTPQ="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:O9l5JURKSVm4DIgdVCZTDp3GUFc= sha1:nG3nBMKFR5OXp3K1iie49dMcl4E=
Xref: csiph.com comp.lang.c:390924
scott@slp53.sl.home (Scott Lurndal) writes:
> David Brown writes:
>
>> On 26/02/2025 15:39, Bradley K. Sherman wrote:
>>
>>> Just do your best to keep it neat and under 80 columns.
>>
>> Neat, yes. 80 columns, no - unless you are living in the previous
>> century.
>>
>> Lines that are too long are hard to read, but the idea that 80
>> columns is a good number or should be a hard limit is /long/
>> outdated. [...]
These statements exemplify the sort of tripe offered by people who
have strong opinions but no facts. Proof by innuendo.
> I tend to prefer the 80 column constraint. I use vim with both
> horizontal and vertical splits to work on a codebase with several
> hundred source files; 80-column lines are much easier to read in
> that environment, where each split may only be 80 columns wide
> with two or three vertical splits available on a wide (16x9)
> screen.
>
> Makes it easly to move between files/splits using the keyboard,
> especially useful over ssh.
I often read code on 8.5 by 11 paper. I find using that medium
gives me a wider focus, and lets me understand how code fits
together on a large scale, better than looking at code on a
display, even a very large one. Having more than 80 columns per
line when using a paper medium makes the characters smaller, and
IME increases the amount of effort and energy needed when reading,
which consequently limits the amount of time I can spend reviewing
and understanding code. There are other reasons to want to limit
line lengths to something near 80 columns, but the effect of output
on standard paper media is one of the most compelling.