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

has haskell made all this pluggable?


I don’t believe Haskell has support for algebraic effects. OCaml is getting them though.


There are various Haskell effect libraries though.

The big difference between effects and monads is that effects compose, while monads always require cumbersome mapping between domains.


"What is language feature in regular programming languages is a library in Haskell"

I will continue repeat that. ;)

I also wish other languages go the way Haskell goes.

There is at least one algebraic effects library in hackage [1].

[1] https://hackage.haskell.org/package/effect-handlers


Sure, but now your program needs to use this library everywhere, or implement Monad transformers etc. to interoperate with existing code.


I can make my own library, or modify the library given above, or write a wrapper - I have more choice than "use this concrete syntax rule for that kind of things".

Moreover, values with effects are first class values, I can pass them, extend them, combine them, in some rare cases inspect them, abstractly interpret them, and last, but not least, evaluate them. Most often than not, this is not the case when they are language feature.


indeed thanks :)




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

Search: