Discriminated unions in 2024

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. OneOf

    Easy to use F#-like ~discriminated~ unions for C# with exhaustive compile time matching

    OneOf is implemented as a non-overlapping struct so

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. OneOf.Serialization

    ❌ Plus, it's not serializable; an unrelated library does that, but forces me to take a dependency on Newtonsoft.Json.

  4. csharplang

    The official repo for the design of the C# programming language

    This means we rely on switch expressions rather than a Match function with lambdas for each case. Unfortunately, unlike lambdas, switch expressions don't allow blocks of code. However, we can emulate them like this:

  5. ExhaustiveMatching

    C# Analyzer Adding Exhaustive Checking of Switch Statements and Expressions

    I tried ExhaustiveMatching, and found that:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Discriminated Unions: Essa feature faz falta no CSharp

    2 projects | dev.to | 5 Feb 2024
  • What's new in C# 12: overview

    4 projects | news.ycombinator.com | 20 Oct 2023
  • Have you heard of AnyOf .NET Lib?

    3 projects | /r/dotnet | 18 Mar 2023
  • How do you live without tagged union types?

    7 projects | /r/csharp | 1 Mar 2023
  • The functional journey of C# - Mads Torgersen - NDC Copenhagen 2022

    3 projects | /r/csharp | 22 Aug 2022

Did you know that C# is
the 10th most popular programming language
based on number of references?