3 ms·
A disadvantage of intensional purity (limiting the language to guaranteed-pure constructs, which is enforceable by a compiler) is, ironically, that it gives the
by catnaroek 11y ago
A disadvantage of intensional purity (limiting the language to guaranteed-pure constructs, which is enforceable by a compiler) is, ironically, that it gives the programmer less control over how extensionally pure functions (i.e., no observable effects, which is obviously undecidable) are evaluated. In ML (an impure functional language), you can evaluate extensionally pure functions strictly (the straightforward manner), lazily (which Haskell gives you out of the box, but in ML requires reference cells), memoizing previously computed results (which Haskell can't easily do, but in ML can be done with reference cells), etc.