-
Notifications
You must be signed in to change notification settings - Fork 13
Standardize the use of std::cout/std::cerr for printing in C++. #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer the printf
/fprintf
family. Some rationale:
- it's mostly shorter compare to
std::cout
. - format string is understandable by most programmer, even those who writes Java.
- easier to substitute when we are ready for
std::print
.
But, no matter what, this really is minor. Given that you made changes already, I am fine with either way.
Yeah, Ideally I'd have prefer |
The thing is, complicated object prints are supported via Anyway, let's get this merged. ;) |
Don't worry about convert to cout/cerr to formatter print style format, you can use codex/claude to do it. to unify them, use universal logging module, ask codex/claude to change all printing and std::out std::err to universal logging module |
All the codebase uses the logger. These print are either in the examples or in the tests. Do we want to use the logger in these too? |
464d8a0
to
1698458
Compare
Related issue #311 |
Signed-off-by: rafa-be <raphael@noisycamp.com>
Signed-off-by: rafa-be <raphael@noisycamp.com>
8cb6ae9
to
a9847c9
Compare
I had issues with the use of
std::print
with LLVM libc++ or with GCC 13:This standardizes the use of
iostream
s instead over the whole library.