News for hackers. Stuff that matters.
Re:C++23: The Next C++ Standard by Dylan16807 on Tuesday July 11, 2023 @03:53PM (#36686428)
Printf is fine until you have to deal with the "f".

Some compilers can keep format strings type-safe, but they are going above and beyond the standard to make it happen.

Re:C++23: The Next C++ Standard by tristan957 on Tuesday July 11, 2023 @04:19PM (#36686689)
If you are using a compiler that doesn't support this, developer tooling like clangd and clang-tidy can help catch these issues too.
Re:C++23: The Next C++ Standard by Dylan16807 on Tuesday July 11, 2023 @04:26PM (#36686775)
Today, yes. But it's relevant for a claim that C had it right "all along".
Re:C++23: The Next C++ Standard by LordShredda on Tuesday July 11, 2023 @07:35PM (#36688594)
Maybe this should've been something built in if automated tooling can catch it?
Re:C++23: The Next C++ Standard by kazinator on Tuesday July 11, 2023 @07:00PM (#36688362)
> above and beyond the standard

That's a very low bar though.

There are widely used languages that don't have a standard at all; literally every single thing you can do in them is above and beyond any sort of standard.

Re:C++23: The Next C++ Standard by Dylan16807 on Tuesday July 11, 2023 @08:56PM (#36689181)
Few of those languages corrupt the stack when you print wrong.