I acknowledge that placing a `!` after `if` may not be ideal when there is an initialization statement separate from the condition—especially if the initialization statement is lengthy. So I do not plan to add it to `for` statements. I intend for the structure
as a whole with `if !` or `if not`, rather than just adding `!` in front of parentheses. Regardless, it indeed simplifies superfluous parentheses, and perhaps people will get used to it once it becomes widely accepted.
Moreover, the core appeal of the previous similar proposal, P1181, is that it allows for the easy use of the nagation of the condition when the initialization statement is the condition itself. Overall, I believe allowing an initialization statement is not
harmful.
The reason for the placement of constexpr afterwards is also because I want to treat `if !` or `if not` as a whole, rather than separate them.
From: Std-Proposals <std-proposals-bounces@lists.isocpp.org> on behalf of Jason McKesson via Std-Proposals <std-proposals@lists.isocpp.org>
Sent: Sunday, April 21, 2024 1:55
To: std-proposals@lists.isocpp.org <std-proposals@lists.isocpp.org>
Cc: Jason McKesson <jmckesson@gmail.com>
Subject: Re: [std-proposals] if !(condition)