Description
Most recent and current 4.7.x RTM release of FSharp.Core we've had two targets: .NET Framework 4.5 and NetStandard 2.0. This is now dropped in favor of NetStandard 2.0.
However, .NET 5.0 is around the corner and replaces the NetStandard system by having only one .NET for all platforms moving forward. .NET 5.0 gives us a host of new possibilities, like System.Half
intrinsics (n/a prior to NET 5.0), ImmutableArray
(not in NetStandard), the Span and related types (not in NetStandard 2.0, but in 2.1) etc.
And, important for F#, having a .NET 5.0 target will allow further optimizations like utilizing SkipLocalsInitAttribute
in specific tight FSharp.Core places (see also this comment: dotnet/runtime#454 (comment)).
I realize this request may be contentious as we just recently decided to remove the NetFx target in favor of a single NetStandard 2.0 one, but requiring all code to run in NetStandard 2.0 limits our possibilities moving forward, so I hope to find support to reopen this discussion. Technically it's an easy change, though we'll need to be willing to also carry the burden of having and maintaining #if NET50
-like code in specific locations in FSharp.Core.
For background, I proposed some alternative approaches here which might prevent having two separate targets (fsharp/fslang-design#500 (comment), as follow-up to @cartermp's reply to the PR-RFC for System.Half), but to be honest, I don't really like any of them. Some discussion of whether there's an alternative way to use future types without multi-targeting can be found in this SO question. Bottom line: there are none.
More info on MS's policy of versioning NetStandard/.NET Core/.NET 5.0: https://visualstudiomagazine.com/articles/2020/09/16/net-standard-future.aspx