Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Loops (was Re: do { quit; } else { }) Date: Tue, 22 Apr 2025 15:02:34 -0700 Organization: None to speak of Lines: 44 Message-ID: <87selzyhvp.fsf@nosuchdomain.example.com> References: <20250419092849.652@kylheku.com> <20250421145818.767@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Wed, 23 Apr 2025 00:02:38 +0200 (CEST) Injection-Info: dont-email.me; posting-host="559a91cae6b172c7f978eee8629ad54d"; logging-data="1603755"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/flVVPf7KA81irxc+DyzaW" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:AWRvC/lyTh97o/3B8PdoRIradXs= sha1:RTyqRrQhaBikVzgawh6uMUyI/QU= David Brown writes: > On 22/04/2025 02:12, bart wrote: [...] >> (Only Keith cautiously welcome the idea of such a feature, while MS >> said he would vote against it, and JP said they would have proposed >> it on April 1st.) > > I don't recall reading Keith saying any such thing. He said he would > be willing to nit-pick a proposal for a new "for-loop" syntax - not > that he would welcome it. Perhaps he just thinks he would enjoy > nit-picking such a paper. As for using a feature if it were added to > C, I know I probably would do so in my own code - that does not imply > that I think such a feature is needed, or that I have any trouble > using C's current syntax for simple loops. (I find C++'s alternative > for-loop syntax nicer for iterating over containers, but that is not > as easily translatable into C.) Here's what I wrote: """ Again, I would not object to adding a new kind of for loop, similar to what you would prefer, and visually distinct from the existing for loop, in a new version of the C standard. But that's not likely to happen because there doesn't seem to be much demand for it (for reasons that I know make you angry), and I don't care enough to write a proposal. If someone else does write a proposal, I'll be glad to help out by nitpicking it. """ I'll accept that "cautiously accept" is close enough to "would not object". [...] > I guess I am the exception - I've never needed any of these. But for > your information, C23 has a _Lengthof operator C23 does not have _Lengthof. It's proposed for C2y. [...] -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */