4 ms·
C# has most of the same pattern matching functionality at this point
by mfatica 7y ago
C# has most of the same pattern matching functionality at this point
- McWobbleston 7y agoThere'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
- macca321 7y agoYou can get a pretty reasonable facsimile using some libraries I made: Discriminated unions: https://github.com/mcintyre321/OneOf https://github.com/mcintyre321/OneOf and One line value objects: https://github.com/mcintyre321/ValueOf https://github.com/mcintyre321/ValueOf
- McWobbleston 7y agoI'm constantly impressed by ways people manage to extend C# like this. I'll have to try this out :)
- coldacid 7y agoI 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!