C++ Logo

std-proposals

Advanced search

Re: [std-proposals] MACROS

From: William Linkmeyer <wlink10_at_[hidden]>
Date: Thu, 28 Apr 2022 13:05:08 -0400
+1 — this would be a highly unusual addition to the standard.

> On Apr 28, 2022, at 12:58 PM, Jason McKesson via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> You failed to present any motivation for these changes. Furthermore, I
> don't know why we would want to add a bunch of macros (which cannot be
> imported from a module) for such trivial things. Since we got
> range-based for loops, the number of times I've had to loop over a
> count is dramatically reduced. And with `ranges::iota` or similar
> tools, that's now pretty much never. Having a way to spell
> `while(!expr)` seems pointless; just read the expression.
>
> And `rep` is just a bad idea. `while(true)` is an incredibly dangerous
> thing with a myriad of side-effects (if you don't do certain things in
> the loop, the forward progress guarantees of the standard allow the
> compiler to straight-up drop the loop body). It's sufficiently
> dangerous that we should absolutely not have a short-form version of
> it.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2022-04-28 17:05:14