See the links I listed above. None of those features solved a language problem as large as the lack of sum types. It baffles me that they even spent time on them before providing a feature that is in such high demand (and has been for more than a decade).
I understand that you shouldn’t always give users what they ask for - but this is something that has picked up steam in other languages because it’s actually useful and makes code bases easier to maintain.
Yep, this is exactly the approach we take. It works ok-ish, but it’s far from elegant. In our case ‘read’ is ‘Switch’. I think it’s a fairly common pattern in C# these days.
> We're discussing Windows and all its ad-ware/invasive changes, and someone brings up C#
I brought up C# because the article discusses a Microsoft Windows design philosophy that I feel is also reflected in their approach to C#. It’s a Microsoft thing.
I agree with you that the examples you mention were great additions to the language! But I still think the C# design team has some seriously screwed up priorities. My theory is that this one year cycle they are on is hampering their ability to make changes (like sum types) that require more than a year of work.
Yes, very clunky. One of the big issues with this approach is that switch expressions still require a default branch because there’s no way in C# to express a completely closed set. This makes future changes to the set (sum type) hazardous.
They're doing the same thing with C#. The amount crap they have added to that language over the years is mind boggling - yet, we still don't have sum types which is the one thing that every C# developer I have worked with _really_ wants.
I understand that you shouldn’t always give users what they ask for - but this is something that has picked up steam in other languages because it’s actually useful and makes code bases easier to maintain.