-
Notifications
You must be signed in to change notification settings - Fork 802
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
Use recommended postfix notation for generics #14530
Use recommended postfix notation for generics #14530
Conversation
I think number 4. should be For F# arrays, use the syntactic name |
Note that I simply quoted the whole list for completeness. This PR does not touch any array notation, as per my understanding of #14465 (comment). |
Thanks for clarifying :) |
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.
Thanks for this, @cmeeren, it's important to be consistent at least with our own guidelines.
I'm afraid we need to update the correspondent .fs
files, that's why we have all those CI errors.
I am kind of on the fence if this should be an error or not actually. In theory, this is compilable so the error is a bit harsh, but practically I can't see any reason or benefit for such an inconsistency between .fs and .fsi files and it's easy to address both.
Probably should be a warning though.
Ok, do you want me to go ahead and perform the same replacement in the |
And importantly, do you want me to update only the required places (corresponding to the |
@cmeeren well yes it would be awesome if you fix the required places, then the CI will pass and we could already merge the PR. But if you have time, feel free to fix some other occurrences as well - you will definitely get extra F# karma points for that :) |
I'll do that! For the record, in case the effect of the signatures aren't clear: The primary reason I am making this change isn't because I am heavily invested in minute stylistic details in FSharp.Core, but because the non-idiomatic notations propagate (via type inference and Intellisense/LineLens etc.) into user code bases. |
Thanks a lot! Well, that's anyway beneficial for the F# repo itself as well :) |
Hopefully works now. Cleaned up the commits. I have removed all edits from test files, since I am unsure what is safe to change here (some of the tests may be testing the different notations for all I know). |
Note that for a while I was thoroughly confused due to very many usages of |
@cmeeren thanks for the update, CI is green, @dsyme please reapprove.
I am on the fence with this actually, but feel free to create a ticket and elaborate a bit, someone can pick it up then. Note I created a ticket for an analyzer to force the conventions, I think that would be useful and expected by C# users. |
I agree we should do this in our own code |
Fixes #14465
Uses postfix notation for types listed in the F# code formatting guidelines: