Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.

[1] https://github.com/louthy/csharp-monad


[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.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: