Hacker News new | ask | show | jobs
by bad_user 2104 days ago
> One ought to be able to express more nuanced side effects such as network/disk access or console I/O.

That’s one way of solving the issue, but is IMO overkill. It doesn’t tell you much about what side effects can be executed out of order, in parallel, etc.

It’s also yet another encapsulation leak, although I know Haskell devs have this mentality that the signature should describe the implementation perfectly (principle of least power), with which I very much disagree with.

Another way is to not describe IO-like values at all.

In many cases you can describe a data structure that can later be materialized into an IO by an interpreter (e.g Free Applicative/Monad would be one way of doing it).

1 comments

> ...with which I very much disagree with

Say some more about that?