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