4 ms·
Don't be. The fundamental observation that monad's usability is tied closely to Haskell's features is important, and still hasn't been taken on board elsewhere
by moomin 13y ago
Don't be. The fundamental observation that monad's usability is tied closely to Haskell's features is important, and still hasn't been taken on board elsewhere. There's always someone trying to do monads in Clojure...
- octo_t 13y agoScala has plenty of monads and they work fine.
- rtpg 13y agoScala also has some pretty powerful syntax to go with
- marijn 13y agoScala has a much more powerful type system than Clojure
- fusiongyro 13y agoYes, but doesn't it also have the three requirements mentioned by the article: ML-style function foo, something akin to type classes, and polymorphic return types?
- yohanatan 13y agoIn Scala, currying is not all-pervasive. You have to be explicit about it (and it's a definite pain point).
- bunderbunder 13y agoYup. If I had read this article when it was first written instead of now, I probably would have produced a fair bit less unnecessarily complicated and difficult-to-maintain code over the past several years. Instead, I had to figure out why I was having such a hard time coming up with a satisfactory implementation of the pattern in C# - and why I maybe shouldn't have wanted one in the first place - the hard way.
- alipang 13y agoJust curious, why would you argue that you shouldn't have wanted it the first place? Monads are one thing, which you can approximate somewhat via LINQ, but there are other simpler patterns such as Monoid, that really makes sense to use as programming construct, that just somehow never works in C#.
- bunderbunder 13y agoBecause it seems like there always turns out to be some other approach that works better and is more idiomatic in C#. Usually something really forehead-smackingly obvious like mutation or a callback.