| ▲ | FrustratedMonky 2 days ago | |||||||||||||||||||||||||
Serious question, at this point, have all F# features been fully incorporated into C#? | ||||||||||||||||||||||||||
| ▲ | louthy 2 days ago | parent [-] | |||||||||||||||||||||||||
Not discriminated unions, but they're coming (I think next version of C#). Although for now you can simulate them quite easily:
Pattern-matching works well with these simulated algebraic data-types. Obviously, exhaustiveness checks can't work on 'open' types, so it's not perfect, but you can unpack values, apply predicate clauses, etc.Other more niche features like type-providers don't exist either (although arguably those could be done with source-generators in C#). It's been a long time since I did any F#, so not sure if there's anything new in there I'm unaware of. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||