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, 02 Mar 2025 06:00:13 -0800 Organization: A noiseless patient Spider Lines: 34 Message-ID: <86h64bwn0y.fsf@linuxsc.com> References: <20250225104754.267@kylheku.com> <874j0g2a8u.fsf@onesoftnet.eu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 02 Mar 2025 15:00:14 +0100 (CET) Injection-Info: dont-email.me; posting-host="3262fa73ab11de5fd8cc37f0606a7eed"; logging-data="856971"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2v5vPTP8coROC9nL47jNQb3vA5Z1voP4=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:sXy/2pzYtjdfa2EoqP/5SrZmj7Q= sha1:nHmKPK97TxXtAP51NXxBFCqgZXU= Xref: csiph.com comp.lang.c:390641 Janis Papanagnou writes: > On 26.02.2025 12:53, Ar Rakin wrote: > >> Janis Papanagnou writes: >> >>> Re "goofy style"; I've seen someone preferring >>> >>> while (q(a,b)) >>> { >>> a=b; >>> f(x); >>> if (c>d) >>> { >>> g(y); >>> } >>> } >>> >>> To each his own. >> >> That looks like a nightmare for the code reviewers. > > I cannot tell where that comes from; the person who uses it is an > experienced Perl programmer - may that be some convention in that > specific language context? (I can't tell.) It's called Whitesmith (Whitesmiths?) style. It is (or was?) used in PJ Plauger's company, who IIANM among other things wrote one of the first C compilers done outside of Bell Labs. For those who don't recognize the name, PJ Plauger was involved in C standardization efforts from an early date, and was a member of WG14 for more than 20 years even after the first C standard was published.