Re:C# Pattern Matching
by macca321 on Tuesday February 04, 2020 @05:31PM
(#22241792)
Apologies, but here's the obligatory link to my OneOf exhaustive type matching library: https://github.com/mcintyre321/OneOf
[ Parent
| on HN ]
I built something simliar https://github.com/jonschoning/Unions/tree/master/Unions
I went with `object` internally instead of subclasses.
One thing that I like about my lib is that is serializes to json pretty well, and i added some more special-case variants such as accumulative errors (AccResult) and some applicative lifting operations.
Re:C# Pattern Matching
by throwawayy8292 on Tuesday February 04, 2020 @06:53PM
(#22242477)
Hey I wanted to thank you!
I stumbled across your repo a few years ago, when I was looking at more powerful ways to use the C# type system.
I ended up pulling a heavily inspired version of your code into a utility library I made (for a zero dependency package).
https://github.com/Matthew-Dove/ContainerExpressions#eithert
Once again - thanks for your contribution to my learning!
Re:C# Pattern Matching
by jodrellblank on Tuesday February 04, 2020 @07:13PM
(#22242637)
Did you just dox your own throwaway?
Re:C# Pattern Matching
by throwawayy8292 on Tuesday February 04, 2020 @07:24PM
(#22242713)
Yep, just got excited when I saw a familiar name I guess. Nothing too egregious on this account's history anyway.