The Dream of C# 9.0

Simplified Null Validation

Let’s start off with something simple.

Primary Constructors

C# 9 has proposals that would allow you to simplify class constructors in the same way that you can in TypeScript.

Record Classes

Records are so similar to primary constructors that I’d almost say they’re a minor syntax tweak variant of primary constructors.

Discriminated Unions via Enum Classes

My number one wish for the C# language is support for Discriminated Unions and matching on various types. Incidentally, this is my number one favorite feature in F# as I’ve written previously.

Closing Thoughts

As I mentioned earlier, C# is clearly trending towards supporting more functional programming techniques — for those who want to use them.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Matt Eland

Matt Eland


I help people love writing code through writing, speaking, and teaching on Software Engineering & Data Science