domn1995/dunet
C# discriminated union source generator
▲ 1 hacker recommends C# ★ 888 MIT csharpcsharp-sourcegeneratordiscriminated-unionsdotnetexhaustiveness-checkingfp
Recommended between 2025-10-05 and 2025-10-05. Last pushed 2026-10-14.
▲ 1 recommend · ▼ 0 criticisms
What hackers say
“Also, it is possible to use OneOf[1] and Dunet[2] to get access to DU”
— CharlieDigital, 2025-10-05 · original comment on Hacker News ↗
show original comment
I think people who last looked at C# 10 years ago or haven't adapted to new language features seriously don't know how good C# is these days. Switch expressions with pattern matching are absolutely killer[0] for its terseness. Also, it is possible to use OneOf[1] and Dunet[2] to get access to DU [0] https://timdeschryver.dev/blog/pattern-matching-examples-in-csharp [1] https://github.com/mcintyre321/OneOf [2] https://github.com/domn1995/dunet
Badge for your README
[](https://hackerrepos.org/repo/domn1995/dunet)