Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't writing out to the network a side effect?

Edit: Haskell folks are a bit touchy :) Just a joke, I use Xmonad, I'm cool with y'all.



Generally, it is the desired effect. In Haskell, it will be reified in an IO action, will appear in type signatures, and - as a value - can be manipulated and combined with similar values. It will only be a side effect if called with unsafePerformIO or similar, and the Haskell community will rightly condemn you for doing so (outside debugging) without a proof for why it's both okay and necessary in this circumstance - relying on side effects means you lose all kinds of guarantees that the type system usually affords you.


Yes. Haskell provides excellent facilities for cleanly managing side-effectful code, like the IO monad.


Managing side effects is one of Haskell's biggest selling points


It may have been an innocent question, but it implied too much and it implied myths.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: