3 ms·
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
by dk8996 11y ago
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.
- louthy 11y agoAgreed, 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. [1] https://github.com/louthy/csharp-monad https://github.com/louthy/csharp-monad
- miloszpp 11y ago[Author] I wasn't trying to say that Option monad is better/worse than null conditional. My point was to compare two different approaches to the same problem.