3 ms·
"type checking format args" [1] is rather sad reading. I think that it's time to admit that C++ will never have things like string interpolation, that are norm
by galkk 3y ago
"type checking format args" [1] is rather sad reading.
I think that it's time to admit that C++ will never have things like string interpolation, that are norm in other modern languages.
[1]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2757r2.html https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p27...
- vinkelhake 3y agoWhat a weird comment. What would be the point of "admitting" something that is an obvious fact? std::format, being a function for string formatting, is already part of the C++ standard library and can do some of its error checking at compile time. The paper you link is about making that error checking even better.
- galkk 3y agoAnd that is the problem, from my pov. Instead of accepting reality that this part of c++ plain sucks and needs significant improvements, they try to do tactical updates. There are 2 names of such activities, select one which you prefer: gold plating/turd polishing...
- logicchains 3y ago>c++ plain sucks and needs significant improvements What a silly thing to say. How many other mainstream languages support writing a library for compile-time checking of format strings? Having the power to do this as a library means that you can also write similar stuff customised to your own needs when you need to, as it doesn't rely on anything hard-coded in the compiler.