Hacker News new | ask | show | jobs
by thowaway202107 1647 days ago
I think the point was that for that remaining bit that can’t be extracted into pure functions still is really broad in what it can do with just “IO”

IO on it’s own could mean disk, network, environment variables, sub processes, etc.

My take away is that they’d like to see IO defined as the union of its parts that can also be decomposed, so you’d have a DiskIO monad or ExecIO

That way you can be more certain that you’re not accidentally going to do a bunch of network io before your sub process kicks off. Right now you can’t have that guarantee (out of the box, at least. idk if there’re any user land libraries to do such a thing)

1 comments

Agreed, and as another person commented, a logging system doesn't actually need to live in the (too broad) IO monad.