Re:Scala's Option monad versus null-conditional operator in C#
by dk8996 on Saturday February 20, 2016 @06:48PM
(#11142547)
Trivial to implement but not compatible if we both implemented. That's the main benefit of Scala Optional, its baked-in -- I don't have to worry about writing adapter to use your library.
[ Parent
| on HN ]
Re:Scala's Option monad versus null-conditional operator in C#
by louthy on Saturday February 20, 2016 @06:57PM
(#11142582)
Agreed, there is no functional base with C# aside from LINQ. So if you want to do functional in C# you would have to chose a library, and that's why I went so far building the rest of the functional infrastructure around it. It'd be insane to use multiple Option implementations. My first attempt at bringing common monad support in C# [1] suffered from the problems you state.
But that still doesn't change the crux of the blog post, it's disingenuous comparing the Option monad to a null coalescing operator.