Open turol opened 2 years ago
Not a fan to be honest. The fmt
lib can increase compiletime quiet badly at times and is kind of obsolet with C++20 formatting library (which is a 1:1 replacement): https://en.cppreference.com/w/cpp/utility/format
I don't think the steam runtime compiler supports C++20.
Maybe there's a backport that can be used? agree that iostreams generally sucks. agree that anything that increases compile times significantly should be avoided too.
fmt is the backport/prototype before standardization. I have used it in several projects and haven't noticed any compile time increases.
Just ran a quick test. Simplish "hello world", compile time: 0.04 seconds for C printf, 0.20 seconds for iostreams 0.34 seconds for fmt No quite as fast but not excessive either.
We can use the fmt
lib (i'm a fan of it myself, just wanted to point out the compiletime aspect).
It's great since it's standard compatible and it probably won't make a large difference in compilation times. Once C++ 20 gets more mature and is compatible with the steam runtime we have a nice upgrade path.
I'd say go ahead and bring in fmtlib. It can takes years before the steam runtime supports C++ 20
The current logging framework uses streams. They're all around terrible, hard to read and slow. Replace with fmtlib.