3 ms·
Yeah, I was expecting something like what you get in F#. But maybe it is just the nature of the [C#] language. Still, I think this looks more readable than if-
by snowcrshd 10y ago
Yeah, I was expecting something like what you get in F#.
But maybe it is just the nature of the [C#] language. Still, I think this looks more readable than if-statements.
EDIT: Maybe it is just a bad example of pattern matching, the one they put on that page. I'm betting pattern matching works on the added tuple type. That would be pretty handy.
- rjbwork 10y agoDidn't want to do this out of the gates, but now that I've started a discussion, and folks seem to agree, check out this library I'm working on. https://github.com/Jagged/OneOf https://github.com/Jagged/OneOf I've got some more performance improvements and code cleanup in my stash RN I've not quite finished up yet.
- rjbwork 10y agoForgot to say earlier - Currently being distributed @ https://www.nuget.org/packages/DiscU https://www.nuget.org/packages/DiscU
- platz 10y agoyou're right; it's not (my other comment on this page: https://news.ycombinator.com/item?id=13835765 https://news.ycombinator.com/item?id=13835765)