-
Notifications
You must be signed in to change notification settings - Fork 29
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
Migrated from printf to std::cout && Removal of Using Namespace std; #293
base: main
Are you sure you want to change the base?
Conversation
What is the motivation for this change? My personal preference currently is to stay with |
Instead of having C++ project I saw most of the component is used here is from C. So, I am working on the migration of this project completely to C++ That is the reason I thought of doing the migration step by step. And I choose printf first. Using Namespace std removed; & Currently working on migrating of one of the function. Most Importly std::cout is having type safety. So, I think its convanient to use it over printf. Thank You |
I don't know how the pull request got closed. I was trying "new merge experience". Anyway I reopened it. |
@@ -25,8 +27,6 @@ | |||
#define QUIC_CALL | |||
#endif | |||
|
|||
using namespace std; |
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 personally prefer the using namespace
model, as it makes all the code below less verbose. Why remove it?
AddrStr.Address, | ||
HandshakeTags); | ||
std::unique_lock<std::mutex> lock(Results.Mutex); | ||
std::cout << std::setw(30) << HostName << " " |
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 think this conversion from printf
to cout
really makes it harder to read and understand what is being printed out.
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.
Hello @nibanks, It will be printed Hostname taking 30 char padding.
I appreciate the contribution. Thank you! For this particular change, though, I feel it makes the code harder to read. I am reaching out on our Discord server (for MsQuic) to get more community feedback before I make any final decision. |
Thank You🙏
…On Tue, Dec 31, 2024, 6:58 PM Nick Banks ***@***.***> wrote:
I appreciate the contribution. Thank you! For this particular change,
though, I feel it makes the code harder to read. I am reaching out on our Discord
server <https://discord.gg/YGAtCwTSsc> (for MsQuic) to get more community
feedback before I make any final decision.
—
Reply to this email directly, view it on GitHub
<#293 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIH54Z3BCQOB4AJKGYKNCTD2IKLXPAVCNFSM6AAAAABUKC3GNGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWGQ2TKNRRGQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Hello,
Tested from myside and its working!
Thanks