Maybe I’m wrong but for me “side-effect“ is when you cannot apply referential transparency in A -> B or C, then you use Either, Option and so on. And “effect” is when you change the state of the world so you need to move it with you, and for that you use IO or Higher kinded types
-
-
Yeah and you can apply equational reasoning as others data types like list but coincidentally (and arbitrarily) ghc and other compiles use it as the main point entry to do ffi, right? Other compilers could use other data types (like Eff in purescript)
-
Yes they do, since the denotational semantics of IO is "whatever." This is a valid criticism of IO. But IO is as referential transparent as [], Maybe, ((->) t), etc.. If the focus were shifted to the correct properties of IO, we could all work toward something better imo.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.