News for hackers. Stuff that matters.
Re:Fable 3: F# to JavaScript compiler by ben509 on Friday December 04, 2020 @03:44PM (#25307656)
Apparently C# 7 can match discriminated unions quite well[1], with the caveats being:

1. you need a dummy type[2] for empty parts of the union.

2. it still can't enforce exhaustive matching.

[1]: https://stu.dev/pattern-matching-fsharp-union-types-in-cshar...

[2]: Maybe () would work?

There are no comments on this comment yet.