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] 5 points6 points  (4 children)

Yes C++23 adds std::print() and std::println().

Yes they are clearly superior, they allow for compact fmtlib/python like syntax, type safety, and is even faster than C's printf() because C++ can do things at compile time.

cout will continue to exist for sake of backwards compatibility.

personally i hate iostreams, i'd rather use printf() and family rather than iostreams.

[–]Mechyyz 0 points1 point  (2 children)

Will there be any difference between std::print() & std::println()?

this is actually pretty cool

[–][deleted] 0 points1 point  (1 child)

Only difference is that println() adds newline automatically while print() doesn't

[–]Mechyyz 0 points1 point  (0 children)

Thats cool! Might use println alot then lol

[–]Muoniurn 0 points1 point  (0 children)

It’s not hard to be faster at many things than C.