3 ms·
In case someone misses the point of the article -- I know I did, originally! -- the author explicitly lays it out in a comment: > "Sadly–and here is the real i
by the_af 7y ago
In case someone misses the point of the article -- I know I did, originally! -- the author explicitly lays it out in a comment:
> "Sadly–and here is the real intent behind my post–many Haskell programmers believe that IO is necessary to do “real programming”, and they use Haskell as if it were C (relegating lots of work to IO). In other words, monadic IO has proved to be such a comfortable “solution” to I/O in a functional language, that very few folks are still searching for a genuinely (not merely technically) functional solution. Before monadic IO, there was a lot of vibrant and imaginative work on functional I/O. It hadn’t arrived yet, but was still in touch with the Spirit of functional programming. With the invention and acceptance of monadic imperative programming, it’s like the Haskell community wandered into an opium den and are still lying there in a fog.
> [...]
> "By relating Haskell+IO to cpp+C, I’m not trying to lower the former or elevate the latter. Instead, I’m trying to waken functional programmers out of the opium fog and remind them how fun and creative genuinely functional programming can be."
I love Haskell but I'm not well-versed enough to know why other alternatives to monadic IO were discarded. I do know Haskell predates the IO monad.
- maehwasu 7y agoThe quality of discourse in the comments there is amazing. I miss old-style blogging/commenting...
- RubenSandwich 7y agoAnother functional approach to I/O is "effect systems". I'm not aware of "stable" functional language with them in it though. It's mostly academic at this point. Here is some research on it: https://www.microsoft.com/en-us/research/publication/koka-programming-with-row-polymorphic-effect-types/ https://www.microsoft.com/en-us/research/publication/koka-pr...
- ghayes 7y agoYou can take a look at Effects in Idris: http://docs.idris-lang.org/en/latest/effects/ http://docs.idris-lang.org/en/latest/effects/
- RubenSandwich 7y agoOh I didn't know Idris had an effect system. Thanks!
- cies 7y agoThere is a language called Frank. I read a paper on it, called "Do Be Do Be", which was an epic read. https://arxiv.org/abs/1611.09259 https://arxiv.org/abs/1611.09259
- chriswarbo 7y agoConor McBride's primary research area seems to be puns, which he publishes via programming language theory :P My favourite title is "I am not a number, I am a free variable" https://scholar.google.com/citations?user=vO7qGKwAAAAJ&hl=en&oi=ao https://scholar.google.com/citations?user=vO7qGKwAAAAJ&hl=en...
- danidiaz 7y agoSection 7 of "A History of Haskell: Being Lazy With Class" http://haskell.cs.yale.edu/wp-content/uploads/2011/02/history.pdf http://haskell.cs.yale.edu/wp-content/uploads/2011/02/histor... explains how Haskell IO was done in the pre-IO monad days. This recent paper by Oleg Kiselyov ("Effects Without Monads: Non-determinism Back to the Meta Language" https://arxiv.org/abs/1905.06544 https://arxiv.org/abs/1905.06544 https://www.youtube.com/watch?v=fABeIG_HiyU https://www.youtube.com/watch?v=fABeIG_HiyU) explores an alternative to monads for structuring effectful computations in OCaml. The effect used in the examples is nondeterminism, instead of IO. The ICFP presentation "Automatically escaping Monads" is also interesting https://www.youtube.com/watch?v=wG8AErq6Bbo https://www.youtube.com/watch?v=wG8AErq6Bbo http://benl.ouroborus.net/talks/2016-HIW-Escape.pdf http://benl.ouroborus.net/talks/2016-HIW-Escape.pdf
- justinhj 7y agoThe paper "Imperative Functional Programming" https://www.microsoft.com/en-us/research/wp-content/uploads/1993/01/imperative.pdf https://www.microsoft.com/en-us/research/wp-content/uploads/... describes the IO Monad, and compares to two other approaches: Dialogues and Continuations
- crimsonalucard 7y agoI don't think it's the io Monad. It's more do-notation sugar. Nobody would use that crazy free variable scoping pattern if it wasn't for that notation.