Closed dsyme closed 1 year ago
It's a mistake to add a new syntax, different from other dotnet languages, for a feature designed specifically for interop with other dotnet languages. Programmers will now need to know both syntaxes to use this feature.
The RFC now has a syntax designed to be a bit awkward, while it also has sugar (like match ... with null | x -> x.Method
) designed to save programmers typing time when using the feature extensively. That's a bit inconsistent.
It's a mistake to add a new syntax, different from other dotnet languages, for a feature designed specifically for interop with other dotnet languages. Programmers will now need to know both syntaxes to use this feature.
The RFC now has a syntax designed to be a bit awkward, while it also has sugar (like
match ... with null | x -> x.Method
) designed to save programmers typing time when using the feature extensively. That's a bit inconsistent.
F# also interops with JS and TS, syntax fits with literal types and anonymous unions, which are under consideration.
We're looking at this again and after discussion with @vzarytovskii are looking more deeply at
string | null
as the syntax for nullable reference types.We've concluded
string?
overly normalizes nullable reference types as the canonical representation of optionality in F#