3 ms·
First heard about consteval. This is cool, but every time C++ adds new and obscure features like this I cannot stop feeling helpless. Rust-like macros are fine,
by flakiness 5y ago
First heard about consteval. This is cool, but every time C++ adds new and obscure features like this I cannot stop feeling helpless. Rust-like macros are fine, and old languages like Java have linter checks that provides type safety to the format string [1].
Aren't these enough? Apparently no.
There could be a world where people stick with this kind of "pragmatic" solution and stay away from without doing spec-puzzle-solving. C++ is not that world and I've accepted that, but let's make sure the other side holds the majority vote.
[1] https://errorprone.info/bugpattern/FormatString https://errorprone.info/bugpattern/FormatString
- TinkersW 5y agoconsteval isn't really obscure or confusing, it does more or less what you would expect based on the name. There are plenty of esoterically templates shenanigans in C++ but this isn't one of them.
- flakiness 5y agoThat's good to know. I think I have a fight-or-flight response for every C++ new features :-/