2 ms·
Yes. Several alternatives have been available for a while. The success of Victor has been to make the C++ committee accepts the idea that a new formatter was n
by adev_ 3y ago
Yes. Several alternatives have been available for a while.
The success of Victor has been to make the C++ committee accepts the idea that a new formatter was necessary and to bring <format> in the STL.
This was not a small task: The committee has its fair amount of dinosaur gatekeepers and windmills [1]. For the best and the worst.
We at least now have a way forward to evolve from <iostream> if we want to with maybe one day the hope of getting something that can entirely replace iostream.
[1]: Windmills: Person displacing air around but not much more than air.
- GuB-42 3y agoIt is a problem of gatekeeping or just that std::format is actually rather complicated under the hood. For all their flaws, iostreams have the advantage of being simple to implement. They are just overloads of the << and >> operators. std::format and likes require a lot of meta-programming magic to work correctly. It means longer compile times, less tolerance for broken compilers, and possibly weird edge cases, which are important considerations when designing a standard that will be used everywhere. And when it's there, it is there for good, so I understand the committee for being careful. From ANSI C++ to C++20, a lot of work has been done making meta-programming more sensible, and computers became more powerful, which makes it ready for something like std::format.