DStyle: Constraints on declarations should have the same indentation level#4999
DStyle: Constraints on declarations should have the same indentation level#4999wilzbach wants to merge 0 commit intodlang:masterfrom
Conversation
|
Can we please stop adding random formatting rules to the style guide. IMHO, this makes the constraints harder to read and creates needless churn. |
Reason: #4964 (comment) |
i.e. Andrei suddenly decided that he didn't like how some piece of code looked and wanted the style guide updated to be even more restrictive, and IMHO, it's making things worse. As this PR shows, there's a lot of code in Phobos which doesn't follow that indentation, and it wasn't a problem before. I think that it should be perfectly fine to have some of the code indenting the template constraints and some not. The code was all following the style guide before, and it worked just fine. But Andrei just decided that he wanted to change the style guide - again - and poof a bunch of code is getting changed without adding any value (and making it uglier in the process IMHO). |
|
Same thoughts vith Davis. Not everything needs, nor should, be standartized. Granted, readability comes first, writablity second. But that does not mean one should sacrifice all writablity for readability. Note, I am not criticizing the work done here, I am criticizing #4964 comment. |
It is a problem. Phobos is a messy mix of styles, which makes it gratuitously difficult to work with. Let's not argue this please - it's subjective so a decision needs be made. @wilzbach please rebase and let's pull. Thanks! Expect future improvements to the style guide followed by automated enforcements. |
|
@JackStouffer one way or another we get to the same point. I'd be more worried if we had no mechanical enforcement (in which case we'd look at doing this once in a while). |
| if (isInputRange!Range1 && | ||
| isInputRange!Range2 && | ||
| !isInfinite!Range1 && | ||
| !isInfinite!Range2) |
There was a problem hiding this comment.
I feel these following lines should be reduced to be indented once now as well?
82ce804 to
eb2bf6f
Compare
More unification of our codebase :)
(consequence of dlang/dlang.org#1534)
While this isn't automatically enforced yet, a Dscanner plugin has already been written and is in the merge queue (in fact it was used as a basis to generate these automatic replacements) and getting the Phobos codebase to a common style can be done beforehand.
=> So I am sorry that the diff is quite large - however, the idea is that we do this once & don't have to deal with this problem in the future anymore.