2 ms·
> Haskell has excellent I/O support. How do you mean that Haskell makes I/O difficult? Composability is different since effects must be explicit, which is both
by seanmcdirmid 12y ago
> Haskell has excellent I/O support. How do you mean that Haskell makes I/O difficult?
Composability is different since effects must be explicit, which is both a strength and weakness of Haskell. So say you want to add an effectful computation P in some function G, G and all its callers must have modified signatures accordingly. That could be annoying depending on what you are doing.
- DanWaterworth 12y agoI use Haskell a lot. I can't recall ever having to have added IO to a deeply nested expression like this.
- seanmcdirmid 12y agoWhy would it be done if it was hard? The path of least resistance in Haskell dictates not doing this, and carefully figuring out where you want IO up front. In contrast, in a language with side effects you just do it whenever you want and everything compiles as before, for better or worse. PL design is like a box of tradeoffs.
- lumpypua 12y agoDebugging... log "Var x =" x
- DanWaterworth 12y agoNope, just use trace.