Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Learn Modern C++. Parent comment
1. Incompatible with dynamically-generated format strings, in which the order of arguments is different. Example:
std::cout << month << '/' << day << '/' << year
std::cout << day << '/' << month << '/' << year
std::printf(my_format_str, day, month, year);
2. The string allocations which other have mentioned.
3. A lot more typing that is easy to confuse: " << ".
4. The iostreams implementation is super-baroque, with buffer classes nobody uses.
and maybe I'm forgetting things.
Std:seems std:confusing
1. Incompatible with dynamically-generated format strings, in which the order of arguments is different. Example:
... but you now want to adapt that for a non-US locale, e.g. a European one where it's with iostreams, you have to change the code. With C-style printf, you don't (but it's not typeafe and not flexible. But with std::print it could be: and `my_format_str` could be either "{0}/{1}/{2}" or "{1}/{0}/{2}".2. The string allocations which other have mentioned.
3. A lot more typing that is easy to confuse: " << ".
4. The iostreams implementation is super-baroque, with buffer classes nobody uses.
and maybe I'm forgetting things.