Open dsyme opened 2 years ago
There are related questions about whether the record and union patterns (#164, #1152) can be used to implement portions of the corresponding signature patterns.
Any update? Coming from an Elm/PureScript background it’s hard to believe that in F# you can’t use record fields in signatures :astonished:
Any update? Coming from an Elm/PureScript background it’s hard to believe that in F# you can’t use record fields in signatures :astonished:
It's not being worked on as far as I know. We'll accept RFC and PR, and will help with implementation if anyone's interes.
Fortunately anonymous records are allowed in signatures :relieved:
Currently a record type
Can't implement a signature
This is perfectly legitimate and useful.
Pros and Cons
The advantages of making this adjustment to F# are signatures are more natural
The disadvantages of making this adjustment to F# are cost
Extra information
Estimated cost (XS, S, M, L, XL, XXL): S
Related suggestions: https://github.com/fsharp/fslang-suggestions/issues/1122
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
For Readers
If you would like to see this issue implemented, please click the :+1: emoji on this issue. These counts are used to generally order the suggestions by engagement.