C# 8.0 – Platform dependencies


Many of the C# 8.0 language features have platform dependencies.

It’s been almost 20 years since Microsoft released the first version of the C# language. From its inception — when some unjustly deemed it a mere Java copycat — until now with the release of C# 8, the language has had a remarkable evolution.

Async streams, indexers and ranges all rely on new framework types that will be part of .NET Standard 2.1. Therefore .NET Core 3.0 as well as Xamarin, Unity and Mono will all implement .NET Standard 2.1, but .NET Framework 4.8 will not. This means that the types required to use these features won’t be available on .NET Framework 4.8. Likewise, default interface member implementations rely on new runtime enhancements, and Microsoft will not make those in the .NET Runtime 4.8 either.

For this reason, using C# 8.0 is only supported on platforms that implement .NET Standard 2.1. The need to keep the runtime stable has prevented MSFT from implementing new language features in it for more than a decade. With the side-by-side and open-source nature of the modern runtimes, MSFT feels that they can responsibly evolve them again, and do language design with that in mind.

Therefore the .NET Framework is going to see less innovation in the future, instead focusing on stability and reliability. Given that, MSFT thinks it is better for it to miss out on some language features than for nobody to get them.

what’s new in C# ver. 8.0

see also…