11 ms·
It's disappointing they would keep that odd << syntax, which has always looked weird to me. Why not take this opportunity to streamline the calling syntax? Str
by hota_mazi 4y ago
It's disappointing they would keep that odd << syntax, which has always looked weird to me.
Why not take this opportunity to streamline the calling syntax? Streams are no different than regular function calls, e.g.
cout.output("hello").output("world\n")
- layer8 4y agoYou are talking about library API design, not language design. A new C++ syntax will not change how functions in the standard library are named (e.g. operator<<).
- CyberDildonics 4y agoThat is an operator overload of a library and not built in language syntax. Even so there is now std::format https://en.cppreference.com/w/cpp/utility/format/format https://en.cppreference.com/w/cpp/utility/format/format
- hota_mazi 4y agoDoh, you're absolutely correct.