News for hackers. Stuff that matters.
Re:Escape from Callback Hell by rapala on Sunday March 03, 2013 @05:56AM (#5313329)
Of course it's different. What if the IO fails?
Re:Escape from Callback Hell by bjourne on Sunday March 03, 2013 @11:40AM (#5314258)
Then the program dies with an exception. What if a memory allocation in a Haskell program fails? It can happen just as well because allocating memory is an impure operation which you still have to perform from pure functions. Haskell just happens to pretend it has infinite memory available because forcing the programmer to attempt handle out of memory conditions would be impractical and annoying. Haskells "purity" is just a chimera, albeit a useful one. And it's just as useful being able to pretend network operations are pure too.
Re:Escape from Callback Hell by rapala on Wednesday March 06, 2013 @04:40AM (#5330319)
So your whole program just crashes because the prime server was not responding? I think that changes the semantics of isPrime quite a bit.
Re:Escape from Callback Hell by Evbn on Sunday March 03, 2013 @10:41AM (#5314068)
What if pure code throws an Exception?

If every function is effectively impure, it still sucks.