[Language construct idea] The for loop with prepare step

Paul Backus snarwin at gmail.com
Mon Feb 12 16:14:40 UTC 2024


On Monday, 12 February 2024 at 15:58:50 UTC, Quirin Schroll wrote:
> Extend `for` to `for (init; prepare; condition; increment) 
> body`.
>
> The step `prepare` is executed before each check.

I've never heard of anything like this in any other programming 
language, so I'm skeptical by default.

Do you have any examples of code that this feature would improve?


More information about the Digitalmars-d mailing list