Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Regarding assignment to struct
Date: Mon, 22 Dec 2025 04:40:34 -0800
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <86cy46sn99.fsf@linuxsc.com>
References: <86plgo7ahu.fsf@linuxsc.com> <20250505111213.00004b55@yahoo.com> <20250505120145.000014f8@yahoo.com> <87jz6uhkgo.fsf@nosuchdomain.example.com> <_jtSP.16069$v2h6.13921@fx14.iad> <1019l3t$3rqk1$6@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Mon, 22 Dec 2025 12:40:37 +0000 (UTC)
Injection-Info: dont-email.me; posting-host="a7f5d1e51a9a8827e6b0e0c25bf5c54b"; logging-data="3669021"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lSo5nDaYPldUuZbUFTtwEI17xNkXsLPQ="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:OIiXe3g59Q18XsiLOQYZ0o3Uvfw= sha1:QyoOl9Tqvve/O+DFolcEjBrJmjc=
Xref: csiph.com comp.lang.c:395883
Andrey Tarasevich writes:
> On Wed 5/7/2025 12:37 AM, David Brown wrote:
>
>>> That would get an immediate downcheck during review for exactly
>>> that reason.
>>
>> Of course. In fact, if someone presented such code for review (and
>> assuming I noticed the commas!) I'd have to consider whether it was
>> done maliciously, intentionally deceptively, due to incompetence, or
>> smart- > arse coding. In all my C coding experience, I can't recall
>> ever coming across a single situation when I thought the use of the
>> comma operator was appropriate in the kind of code I work with.
>
> Wow! That's catastrophically bad.
>
> As it has been stated many times before, both C and C++ are
> programming languages that embrace both statement-level and
> expression-level programming. Expression-level programming
> (e.g. where ?:` is used for branching and `,` for sequencing) is a
> very valuable and massively important programming paradigm in these
> languages. The fact that elaborate expression-level programming is
> not in nay way abandoned or shunned today is pretty obvious in C++,
> since C++ took major steps lately to develop its expression-level
> capabilities. But it has always been and will always remain
> important in C as well.
>
> The proclivity to stick exclusively to statement-level programming
> in C and, God forbid, impose it in others through so called "code
> reviews"... that would be a trait specific to "sweatshop"
> development outfits, which strive to replace quality with quantity.
> I'd agree that in a revolving door employment environment relying on
> a large number of low-competence developers such code might be seen
> as "too confusing". But I don't see why we should set our standards
> that low here, in `comp.lang.c`.
What's interesting is that the arguments given opposing what might
be called expression-level programming have been sociological rather
than technical.