-
Notifications
You must be signed in to change notification settings - Fork 844
discussion: naming fields in ConstraintSolver's exception types #6604
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
Merged
KevinRansom
merged 1 commit into
dotnet:master
from
smoothdeveloper:naming-constraint-solver-fields
Apr 24, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nit: We don't normally have these sorts of whitespace additions. @dsyme what are your thoughts here?
Uh oh!
There was an error while loading. Please reload this page.
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 noticed that but let it slide, it's ok, it was inconsistent in the signature file in any case.
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.
Do you want me to clear the spacing in #6596, the overload related exceptions are changing.
Uh oh!
There was an error while loading. Please reload this page.
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.
Could we clarify if, for example, such alignement is proscribed/discouraged/recommended/prescribed for specific or any situations in the guidelines:
https://github.com/Microsoft/visualfsharp/blob/master/CONTRIBUTING.md#coding-guidelines
Do the maintainers want to set a bar somewhere else than "code should have reasonable format, good effort on readability, and fit in the context"?
How does that get addressed in the guidelines & our CI/review workflow in the future?
I agree that code alignment makes editing slightly more involved in few cases, this is the main drawback I see, but the readability pros generally outweights it (subjective, for me).
I also agree the maintainers have the command on that when it comes to review/integrate contributions.
To look further around us, have you noticed jetbrains has been adding support for advanced settings for a bit: https://blog.jetbrains.com/dotnet/2017/11/28/aligning-code-columns-resharper-rider/ ?
It indicates that the demand for such features exist.
NB: This is not a rant 😄, let me know how to fix the code in the other PR.
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 am not a fan of column alignment (and an F#-specific variant, arrow aligment in match expressions, is not recommended as per the official style guide)
I don't think we have a hard and fast rule, but uniformity is what's preferred here above all else. That's why lots of whitespace normalization PRs were recently brought in.
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.
Yes we've been removing column alignment. There are some places we still use it though, e.g. tast.fs ValFlags, where it is extremely useful
Mostly we've been removing it to add space for doc comments, e.g.
becomes
Not much point in keeping the alignment when comments are added