-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Restore some comment formatting for BigInteger #15726
Conversation
cc @stephentoub |
@@ -92,6 +95,7 @@ public void Reduce(ref FastReducer reducer) | |||
{ | |||
// Executes a modulo operation using an optimized reducer. | |||
// Thus, no need of any switching here, happens in-line. | |||
|
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.
Why are these blank lines being added?
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.
As I wrote these lines of code I put some extra space below comments with a more "general character". Means: if a comment is just related to the line below, there is no blank line. If a comment is an overall note to better understand the current function, it is an extra block. Same "problem" as when to group some lines of code using new-lines or not.
As I said, they got lost and I did an revert, re-added them. I can remove them, if the change is too peculiar.
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 see. Ok. Some of them to me personally seem like they'd be better without the blank line, but that's just a matter of style. What you have is fine. Thanks.
Thanks, @axelheer. The fixed comments and alignment look good. Not sure why all of those blank lines need to be added, though. |
/// https://en.wikipedia.org/wiki/Exponentiation_by_squaring | ||
/// </summary> | ||
// Executes different exponentiation algorithms, which are | ||
// basically based on the classic square-and-multiply method. |
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.
This can just be "which are based on ..." IMO
I also think the blank lines might be a bit overkill. We don't have any concrete guidelines about that, so it's just up to taste. In this case I don't think it really makes the code any clearer and does make the diff a little bit noisier than it needs to be. I don't really feel strongly about it, though. The other changes look good to me. |
Thanks, @axelheer. |
* Restore some comment formatting for BigInteger Commit migrated from dotnet/corefx@26a7e2b
I just noticed that some comments lost some well intended new-lines and even an important comment got lost somehow. Thus, I did a fancy git revert on those files (okay, rather trivial, but for casual git users like me...).
Why? An important comment got lost (otherwise I wouldn't have bothered). And, I generally add new-lines after "overall" comments, which apply not only to the next line of code.