C++ Logo

std-proposals

Advanced search

Re: [std-proposals] MACROS

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Thu, 28 Apr 2022 12:57:11 -0400
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.

Received on 2022-04-28 16:58:03