4 ms·
> I'm wondering why the C# team is so keen on pattern matching It's kind of a pre-condition (though not in the current initial limited variation) for the intro
by dualogy 10y ago
> I'm wondering why the C# team is so keen on pattern matching
It's kind of a pre-condition (though not in the current initial limited variation) for the introduction of Algebraic Data Types (as F# & co. have them), which I'd still be missing in C# if I had to get working on a C# codebase (might happen again soon, I just don't get any Haskell enquiries in my freelance channels =)
- lacampbell 10y agoWith multiple dispatch, you could already use the existing way of having sum types - class hierarchies - without introducing a second kind. I just don't see why you want both inheritance and ADTs in the same language. But it's entirely possible I'm missing something, I'm an amateur PLT enthusiast at best.
- dualogy 10y agoWould just be syntactic sugar anyway, F# surely compiles its ADTs and parametric polymorphism down to something supported in MSIL bytecode.. but potentially powerfully productive "sugar", any highly expressive language is 80-90% sugar (just the right kind) over a much smaller intermediate core language of way fewer actual primitives