Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's no compiler warning for incomplete matches, and without discriminated unions it's pretty verbose to write pattern-match friendly types

C# has support for most F# features, they're just often awkward to use



You can get a pretty reasonable facsimile using some libraries I made:

Discriminated unions: https://github.com/mcintyre321/OneOf and One line value objects: https://github.com/mcintyre321/ValueOf


I haven't had a need for ValueOf yet, but OneOf has saved my ass now more times than I can count. Thank you so very much for it!


I'm constantly impressed by ways people manage to extend C# like this. I'll have to try this out :)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: