|
|
|
|
|
by Roonerelli
159 days ago
|
|
I've had the misfortune of working on a C# code base that uses this pattern for many years. I've also used it with F#, where it feels natural - because the language supports discriminated unions and has operators for binding, mapping etc.
Without that, it feels like swimming against the tide. Code has a greater cognitive overhead when reading it for the first time.
And there is always a big over head for new starters needing to understand the code. It feels idiomatic in F#. It feels crow-barred in with C# |
|
You can pipe a monadic type through various functions writing little to no type declarations, doing it nicely is F#'s bread and butter.
In C# version n+1 when the language is supposedly getting discriminated unions for real this time I still don't see them being used for monadic patterns like F# because they're going to remain a menace to compose.