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: Co-routines (was Re: acquire + sleep + async) Date: Sun, 21 Jun 2026 18:22:39 -0700 Organization: A noiseless patient Spider Lines: 25 Message-ID: <864iiv8j34.fsf@linuxsc.com> References: <110bj8m$nbcu$1@dont-email.me> <110de8h$17a50$3@dont-email.me> <110dgie$17tcb$1@raubtier-asyl.eternal-september.org> <110dkig$18mtt$1@dont-email.me> <110dnl6$19kmq$1@raubtier-asyl.eternal-september.org> <110dpf8$17r3s$3@dont-email.me> <110ep17$1naub$8@dont-email.me> <110gnqf$24301$1@dont-email.me> <110h2s3$27nuo$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Mon, 22 Jun 2026 01:22:43 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1263054"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Iq4n9Y76qbFRbLvwUMfruIwYiGig8Soc="; posting-host="9b67201edabcc29b0ea9df9e265d2c37" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:Ux6CVvHpEfJ1VeYenKF+/5MzjEc= sha1:IKsTUYmHlcy46jmjLL15CXv9KWM= sha256:PEocJ6mSEYXSXH1xuyLe2iq0OMGQKc2Wo83kAMg+bnE= sha1:/KtE8XfMG+ZLOB9V2rbkrLf8XE0= Xref: csiph.com comp.lang.c:400180 Bart writes: > Regarding compound literals, why is one necessary when assigning to > q' here: > > typedef struct {double x, y;} Point; > > Point p = {10, 20}; > Point q; > q = (Point){30, 40}; > > The initialisation of 'p' doesn't need it, so can't you just do this: > > q = {30, 40}; This idea might be workable in some situations. Certainly though there are lots of other situations where it is not workable. The matter can be seen as a language design question: is it better to have a simpler language that is somewhat less convenient, or is it better to have a more complicated language that is somewhat more convenient? Surely most people would _not_ say that C expression syntax is too simple, and so should be more elaborate. What is the convenience of the proposed addition worth? Does the cost in added language complexity justify the benefit in programming convenience? Would other readers like to weigh in on these question?