Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" Newsgroups: comp.lang.c Subject: Re: C23 thoughts and opinions Date: Tue, 4 Jun 2024 14:47:38 -0700 Organization: A noiseless patient Spider Lines: 31 Message-ID: References: <20240602124448.704@kylheku.com> <864ja9ojit.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 04 Jun 2024 23:47:40 +0200 (CEST) Injection-Info: dont-email.me; posting-host="7c4c98eb41dfab0ad0e4cc91faa640ca"; logging-data="640177"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19rqqdfMUi0mdScFu7qHK/Guh+loTbwntA=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:AnZoYPnPvamfAkMwA1/GFflIXXM= Content-Language: en-US In-Reply-To: Bytes: 1972 On 6/4/2024 1:36 AM, David Brown wrote: [...] > Personally, I'm in the "while (true) { ... }" camp.  To me, "for (;;)" > looks like a weird smiley, and I do not fall for any appeals to Deniis > Ritchie's authority. Writing for (;;) is what I personally tend to write, however if a team does not like that, well, I will use while (true), or whatever... I think I tend to write for (;;) because I can adapt it for something like: for (unsigned long long i = 0; ; ++i) { //... } So, I can get a running counter (i) or something... Oh well. > > > But we are missing another option: > > void mainloop() { >     // do something >     mainloop(); > } > > That should be fine with an optimising compiler. > > Still worry about run away recursion...