Hacker News new | ask | show | jobs
by throwawa66 2326 days ago
Yes, i find that a good argument especially if you plan on using this feature a lot it can save you from shooting yourself in the foot. It also is a better idiom in F#, nicer to grok, but that’s subjective.

However, only direct experience will make you reconsider.

I’ve seen a discriminated union implementation in C# the other day and was repulsed.

1 comments

I use OneOf<T...> in C# a lot now. If you’re thinking of the same one I am the only ugly thing about it is the code-generation required to generate all of the variations from OneOf<T0,T1> to OneOf<T0,T1,T2,T3,T4,T5,T6>.