Deutsch   English   Français   Italiano  
<vvvj3e$1rnon$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c
Subject: Re: Loops (was Re: do { quit; } else { })
Date: Tue, 13 May 2025 15:57:00 +0200
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <vvvj3e$1rnon$1@dont-email.me>
References: <vspbjh$8dvd$1@dont-email.me> <vtc19j$2kqlj$1@dont-email.me>
 <87a58mqt2o.fsf@nosuchdomain.example.com> <vtc7mp$2q5hr$1@dont-email.me>
 <vtcqf6$3j95s$1@dont-email.me> <vtdh4q$b3kt$1@dont-email.me>
 <vtf7fe$1qtpg$1@dont-email.me> <vtgfuf$31ug1$1@dont-email.me>
 <20250413072027.219@kylheku.com> <vtgpce$39229$1@dont-email.me>
 <vti2ki$g23v$1@dont-email.me> <vtin99$vu24$1@dont-email.me>
 <vtiuf0$18au8$1@dont-email.me> <vtj97r$1i3v3$1@dont-email.me>
 <vtl166$36p6b$1@dont-email.me> <vtlcg0$3f46a$2@dont-email.me>
 <20250415153419.00004cf7@yahoo.com> <86h62078i8.fsf@linuxsc.com>
 <20250504180833.00000906@yahoo.com> <86plggzilx.fsf@linuxsc.com>
 <20250511010917.00007702@yahoo.com> <86h61qzn55.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 13 May 2025 15:57:05 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="6665b863c86d411340e9f9cda5abd7d0";
	logging-data="1957655"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+GbRG/fhsY2zs2Xtknfr7O"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:OggZyg2dzwZX/L84TJXZjK0TO7E=
In-Reply-To: <86h61qzn55.fsf@linuxsc.com>

On 12.05.2025 02:30, Tim Rentsch wrote:
> [...]
> 
> Incidentally, a language change to C was once proposed, so that
> a do/while could also have an expression after the while().
> Note that this change is backwards compatible with C as it is,
> because a simple semicolon after while() is an empty statement.
> Adopting this proposal would mean that the language would allow,
> for example
> 
>    do {
>       // this part will always be done at least once
>       // and once more for each time 'condition' is true
>    } while(  condition  ){
>       // this part will be done zero or more times
>    }
> 
> allowing a convenient way of writing "loop-and-a-half" type
> loops.  [...]

This is an interesting proposal.

When was it suggested, and what is the decision state?

What were the arguments, pros and cons?

Janis