mercredi 18 mars 2015

What programming languages discourage side effects?


Which programming languages enforce side-effect-free code, and how do they achieve this?


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