Scala and C# Approaches to Union Types

I’ve been learning Scala lately, and it turns out that scala union types are sometimes implemented the same way I discovered unions could be imitated in C#.

June 1, 2023 · 3 min

Union-based Result Types in C#

I previously wrote about result types and union types in C#. I got to wondering if a union-based approach would allow nicer result types. In short, it works, but not as nicely as I’d hope.

May 29, 2022 · 3 min

Union Types in C#

Union types are common in functional languages, but have yet to make it to C# and similar. These types solve a simple and very common problem, data that is one of a finite set of possibilities. Here’s we’ll look at how to accomplish the same in C#.

March 26, 2021 · 4 min