Uh oh!
There was an error while loading. Please reload this page.
Use recommended postfix notation for generics - #14530
Conversation
edgarfgp
commented
Jan 2, 2023
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). |
edgarfgp
commented
Jan 2, 2023
Thanks for clarifying :) |
psfinaki
left a comment
There was a problem hiding this comment.
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 |
cmeeren
commented
Jan 4, 2023
And importantly, do you want me to update only the required places (corresponding to the |
psfinaki
commented
Jan 4, 2023
@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 :) |
cmeeren
commented
Jan 4, 2023
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. |
psfinaki
commented
Jan 4, 2023
Thanks a lot! Well, that's anyway beneficial for the F# repo itself as well :) |
cmeeren
commented
Jan 4, 2023
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 |
psfinaki
commented
Jan 5, 2023
@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. |
dsyme
commented
Jan 5, 2023
I agree we should do this in our own code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#14465
Uses postfix notation for types listed in the F# code formatting guidelines: