Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Which code style do you prefer the most? Date: Mon, 03 Mar 2025 15:23:52 -0800 Organization: None to speak of Lines: 44 Message-ID: <8734ftn1fb.fsf@nosuchdomain.example.com> References: <87frk10w51.fsf@onesoftnet.eu.org> <20250228144442.00002037@yahoo.com> <868qpnw2sn.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 04 Mar 2025 00:23:54 +0100 (CET) Injection-Info: dont-email.me; posting-host="ec036b031ec9540f8be3589d056f824a"; logging-data="1603597"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ULWyYdkR+ScIdRqtkqEMl" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:pRNW1d7/ci2xGE/+CEaPm9yDU24= sha1:VPuSD7KtapRcIJ2qR3QA0ZJ8JsA= Bytes: 3648 scott@slp53.sl.home (Scott Lurndal) writes: > Tim Rentsch writes: [...] >>The reasoning here is backwards. The choice of 80 columns wasn't >>made to accommodate a given aspect ratio; rather, the choice of >>screen width was made to accommodate 80 columns. Furthermore the >>choice of 80 columns was not plucked out of thin air, or made to >>fit some accidental hardware constraint; rather, the choice of 80 >>columns was made to provide a suitable width for a single line, and >>hardware was designed around that. > > Specifically around the number of columns on a punched card, which > had been used for programming for years before video terminals > were common. In 1982, I visited a Sperry-Univac office in Clear > Lake, Ia and they were still mostly programming with cards - they > had a couple of video terminals on carts that were shared, but > they had far more than two programmers competing for them. And the physical size of the cards was select to match the size of US currency at the time Hollerith cards were invented (1862-1923; modern US currency is not the same size). This was so that the cards could be used with the same equipment used to handle currency. IBM developed 80-column cards, with the same overall size, in the late 1920s. Apparently 80 just happened to be the number of rectangular holes that could reasonably be accommodated (and it's a nice round number). And 80-column video terminals were baed on card sizes (though I think some earlier terminals had 40 columns). Source: I'll just note that the fact that 80 is an arbitrary number, based on technologies we no longer use, doesn't automatically mean that it's a bad rule of thumb for line length. I'm writing this message in a window that's 159 columns wide, but I still keep text a bit shorter than 80 columns, out of old habit and/or because I find it easier to read. Most of my code (include C code, so we're still topical) is also under 80 columns, but I'm not quite as strict about that. [...] -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */