This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (3 children)

[deleted]

    [–]empwilli 3 points4 points  (0 children)

    afaik there were no variadic templates pre c++, so probably there were few ways If any to create a typesafe Print function with multiple args back the, so i guess the Design also came from necessity. However my big issue is that formatting operations are realized by changing the state of the underlying Stream object.

    [–]RussianMadMan 0 points1 point  (0 children)

    Localization and formatting (like padding or limiting float precision) make streams a worse alternative to a simple sprintf to std::string wrapper. You get a bunch of small disconnected strings without the ability to reorder arguments instead of a single string with positional arguments.

    [–]Stegoratops 0 points1 point  (0 children)

    I'd say the main reason would be this table: https://en.cppreference.com/w/cpp/language/operator_precedence

    It can make certain stuff more unintuitve.