News for hackers. Stuff that matters.
Re:A quest for safe text formatting API by flakiness on Saturday June 19, 2021 @11:26PM (#27566837)
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

Re:A quest for safe text formatting API by TinkersW on Sunday June 20, 2021 @03:44AM (#27568003)
consteval 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.

Re:A quest for safe text formatting API by flakiness on Sunday June 20, 2021 @08:35AM (#27569390)
That's good to know. I think I have a fight-or-flight response for every C++ new features :-/