-
-
Notifications
You must be signed in to change notification settings - Fork 359
new C++ style #12
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
new C++ style #12
Conversation
@leios Could you make some comments or something? I know this is a major change, but I'd like to at least talk through it? perhaps make some edits to make it more palatable. |
Not a C++ guy, but why are you using std::uint64_t instead of int? |
James asked for it. |
Hey, sorry for the late reply here. I had a discussion with some of the rest of the community on discord about this pull request (let me know if you want a link). A few things:
Anyway, sorry for the long response and let me know what you think! Thanks again for the help so far! |
@Gathros because |
@leios Not using imo, this C++ code should be as close to recommended style as possible. (basically, it's not less readable, you just aren't used to that style.) |
I know, I was answer the question of why change int std::uint64_t?. |
That is a point that I could change though, if you feel that using |
It's not only about readability. There is no reason not to allow negative numbers for a gcd function.
If you take a look at the pull requests #14, #15 and #16 you will see that most if not all samples have been updated with support for negative numbers. I would recommend adding that patch to your C++ implementation and reverting the types of the parameters back to a signed integer type to keep everything uniform. I won't comment on the use of |
see #17 |
No description provided.