▲ | merlincorey a day ago | |||||||||||||
There's a section on "why not printf" which is Standard C, but I can't find any section on "why not std::format"[1] which is Standard C++ since C++20 and works on all major compilers today in 2025. They do mention "std::print"[2] from C++23 (which uses std::format) and compile times, but, they don't touch on "std::format" at all. See: [1] https://en.cppreference.com/w/cpp/utility/format/format.html | ||||||||||||||
▲ | amomchilov 10 hours ago | parent | next [-] | |||||||||||||
This is the eternal selection pressure that slows new C++ adoption. The kinds of places still waiting C++ aren’t usually the ones that put much emphasis on using a compiler from the past decade. Java 8 and C++98 will be here forever lol | ||||||||||||||
▲ | hoten a day ago | parent | prev | next [-] | |||||||||||||
Is it in major compilers yet? Last I checked for MSVC it was behind a "latest" compiler flag (not C++20). I've been vendoring the fmt library for awhile now. | ||||||||||||||
| ||||||||||||||
▲ | pton_xd a day ago | parent | prev [-] | |||||||||||||
std::print / std::format also bloat the binary size, which is a consideration for some platforms (eg WASM). |