Build Developer Conference: What's New with C# and F#

Microsoft provided updates on its flagship .NET-centric programming languages, C# and F#, during this week's online Build developer conference.

Mads Torgersen, C# lead designer on the .NET team, penned a blog post announcing that C# 9.0 is taking shape, though there is no release date or official preview. Some developers have speculated it would come with .NET 5, shipping this November, but that might not be likely as the COVID-19 pandemic has already delayed some features of the unifying, "just one .NET going forward" .NET 5 effort. A GitHub page says a C# 9.0 candidate is due by Jan. 1, 2090, so developers probably shouldn't hold their breath.

Whenever it does come, Torgersen detailed a slew of new features, with the dev team focusing on "supporting terse and immutable representation of data shapes."

Some of the goodies outlined in his huge post include:

  • Init-only properties
    • Init accessors and readonly fields
  • Records
    • With-expressions
    • Value-based equality
    • Data members
    • Positional records
    • Records and mutation
    • With-expressions and inheritance
    • Value-based equality and inheritance
  • Top-level programs
  • Improved pattern matching
    • Simple type patterns
    • Relational patterns
    • Logical patterns
  • Improved target typing
    • Target-typed new expressions
    • Target typed ?? and ?:
  • Covariant returns
C# 9.0 Features
[Click on image for larger view.] C# 9.0 Features (source: Microsoft).

These features are further detailed on the language's GitHub site, as illustrated in the graphic above.

Other GitHub resources for C# include:

But perhaps the best way to digest the impact and developer feelings about the above features is to read the dozens of comments appended to the May 20 post.

Phillip Carter program manager for .NET and Languages, authored his own post on F# 5 and its tools. The language came out in a preview in March, with a focus on interactive analytics.

Carter detailed some minor additions, as the dev team has been focusing on stabilizing preview features introduced since the last preview release (there was no mention in either post if the COVID-19 pandemic, as mentioned earlier, had delayed possible, more extensive previews that Microsoft might have hoped to unveil for C# or F# during the Build event).

"This release introduces only one new language feature," Carter said. "However, the other features we've shipped so far have been further stabilized. There are a few more features in the pipeline that we're considering before we call F# 5 feature complete, and we'll post updates when they're available."

In discussing "default interface member interop," Carter described how C# 8 introduced the ability to define interfaces with default implementations. Now, he said these can be consumed through the standard method of implementing an interface.

"This will let F# developers safely take advantage of packages or other components written in C# that use this feature and expect callers to support it," he said. "We currently don't support generating default implementations, though. If you'd like to do that, please search for or file a suggestion in the F# language suggestions repository."

Carter also detailed compiler performance improvements and tooling improvements in Visual Studio 2019 Update 16.6, which was unveiled during Build this week.

"The compiler wasn't the only thing that got faster in this release. We've been focusing on improving the performance and reliability of the Visual Studio tools for F# throughout the Visual Studio 2019 lifecycle, and this release is no different! Starting with Visual Studio 2019 Update 16.6, features like Find All References and Rename should run considerably faster and show results much sooner when scanning a large codebase," he said.

In announcing the March preview, Carter provided these resources for more information on development of the language:

In this week's post he said the dev team is now focusing on:

  • Continuing inclusion of language features when their design and implementations are stable
  • Continuing to improve the tooling performance for larger F# codebases
  • Making F# in Jupyter and Visual Studio Code Notebooks the best language for data science and analytical work (more on this in future updates!)
  • Continuing to incorporate OSS contributions and strive to include them into releases as soon as possible

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • What's Next for ASP.NET Core and Blazor

    Since its inception as an intriguing experiment in leveraging WebAssembly to enable dynamic web development with C#, Blazor has evolved into a mature, fully featured framework. Integral to the ASP.NET Core ecosystem, Blazor offers developers a unique combination of server-side rendering and rich client-side interactivity.

  • Nearest Centroid Classification for Numeric Data Using C#

    Here's a complete end-to-end demo of what Dr. James McCaffrey of Microsoft Research says is arguably the simplest possible classification technique.

  • .NET MAUI in VS Code Goes GA

    Visual Studio Code's .NET MAUI workload, which evolves the former Xamarin.Forms mobile-centric framework by adding support for creating desktop applications, has reached general availability.

  • Visual Studio Devs Quick to Sound Off on Automatic Updates: 'Please No'

    A five-year-old Visual Studio feature request for automatic IDE updates is finally getting enacted by Microsoft amid a lot of initial developer pushback, seemingly misplaced.

  • First Official OpenAI Library for .NET Goes Beta

    Although it seems Microsoft and OpenAI have been deeply intertwined partners for a long time, they are only now getting around to releasing an official OpenAI library for .NET developers, joining existing community libraries.

Subscribe on YouTube