3 ms·
Hm? Haskell is purely functional. (Alright, you can theoretically use unsafeCoerce and unsafePerformIO, but in practice it doesn't actually happen.)
by lomnakkus 12y ago
Hm? Haskell is purely functional. (Alright, you can theoretically use unsafeCoerce and unsafePerformIO, but in practice it doesn't actually happen.)
- felixgallo 12y agoCan you please point me to any real-world Haskell program that is purely functional? I am interested in seeing what a program without I/O looks like.
- lomnakkus 12y agoAll of them. Remember that "IO a" is just a value. :) It's really the "interpreter" of the IO monadic values which causes all the side effects. I am aware that there are some issues with this interpretation, but if you want to get pragmatic it's really a question of X% pure/(100-X)% impure while keeping X as close to 100% as possible. Haskell can do that for X arbitrarily close to 100% (depending on how much abstraction/effort you're willing to go through).