|
|
|
|
|
by cleancoder0
1579 days ago
|
|
What Haskell did with Monads is nice, but eventually Monads are just tags on what functionality the function uses. That being said, I like that Nim and Koka did exactly that. You just tag the functions (IO, Async, Whatever) and it works. In Haskell, you need monad transformers (which have a runtime costs) or whatever else was made to allow you to work with multiple different effects. |
|
As monad is just an interface, it doesn't necessary cause runtime costs. Identity is a monad too. Effects may not always require sacrificing performance, but as they can be used to implement exceptions they are not just free compile time annotations. Also the differences discussed there: https://www.reddit.com/r/haskell/comments/3nkv2a/why_dont_we...