There's a long discussion over at https://github.com/dotnet/standard/issues/682. Originally the OP wanted to know whether the new Span-based APIs in the .NET Core 2.1 class library would be made available via a new version of .NET Standard. The discussion has shifted more towards what .NET Standard is, or should be, and one important question hasn't been answered yet so I'd like to ask it here:
Will .NET Core 2.1's new Span-based APIs (*) be brought to the .NET Framework? If so, what's an approximate version / timeframe for this to happen?
(*) By "Span-based APIs", I do not mean what's in the System.Memory package on NuGet, but also all the additional methods in the FCL using Span et al., such as those on Stream. I also implicitly assume that introducing these APIs on NETFX would include support for Span in the JIT.
We haven't finalized our plans for the upcoming release of .NET Framework in terms of feature set and timeline. I expect we'll include that information as part of the .NET Standard vNext plan and which framework versions will implement it and when.
Thanks for replying, @terrajobst. Sorry to keep bothering you, but in this case, can you by chance already give a rough ETA for when the .NET Standard vNext plan will be announced publicly?
Just stumbled over this statement in https://github.com/dotnet/coreclr/issues/18280#issuecomment-394404682:
The proper runtime support by byref-like types and features that depend on it (e.g. fast span) won't ever show up in .NET Framework update [...].
(If that is true, then it might actually be misleading and a disservice to developers to add Span APIs to the FCL... unless slow-span APIs are still faster than the conventional alternatives.)
@stakx I certainly hope that's not what @jkotas was saying. I think his point was that you'd have to opt in by targeting a newer version versus getting upgraded by Windows Update.
@jnm2 - Ah... I see. Yes, let's hope he indeed meant it in the way you just explained it. Thanks for clarifying!
So unless I still misunderstand, that would seem to imply that fast Span won't appear before .NET Framework 5 (since minor versions are usually in-place upgrades)?
@stakx If it's quirkable, it could be done in 4.8. I am very curious to hear what the team's actual plans are.
I'd leave .NET Framework for .NET Core the minute the whole Windows Forms and WPF stack can be developed and run on .NET Core 3. In the meantime, .NET Framework is still important.
.NET Core 3.0 and .NET Framework 4.8 plans were announced at Build conference last month: https://mybuild.microsoft.com/sessions. .NET Core 3.0 is going to add WinForms and WPF on Windows. .NET Framework 5 is not in the plans.
If it's quirkable, it could be done in 4.8
Fast Span is too fundamental change to be quirklable in reasonable way. The quirking works well for local library behavior changes, e.g. return correct value vs. return incorrect value for compatibility with previous version. It does not work for fundamental changes like changing shapes of types.
@jkotas: Since .NET 4.8 is expected 2019 it is pretty clear that Span
Another quote from Rich Lander confirming that (fast?) span won't be in .NET 4.8: https://blogs.msdn.microsoft.com/dotnet/2018/06/06/announcing-net-framework-4-8-early-access-build-3621/#comment-554635
Closing this, as I guess my question has been sufficiently answered: "Span APIs won't come to the .NET Framework because it'll soon be put to rest." If I have misunderstood, feel free to correct me.
Most helpful comment
@stakx If it's quirkable, it could be done in 4.8. I am very curious to hear what the team's actual plans are.
I'd leave .NET Framework for .NET Core the minute the whole Windows Forms and WPF stack can be developed and run on .NET Core 3. In the meantime, .NET Framework is still important.