jeudi 19 mars 2015

In what ways can programming languages discourage side-effects?


How do different programming languages enforce side-effect-free code?


For example, functions in Haskell cannot have side effects unless you explicitly call unsafePerformIO. This is because the only way of producing side effects at all is to use the IO monad.





Aucun commentaire:

Enregistrer un commentaire