3 ms·
Haskell's functions are almost always pure, except for some ordained "special" constructs. If we use purity to test whether a language is functional, it would b
by reikonomusha 10y ago
Haskell's functions are almost always pure, except for some ordained "special" constructs. If we use purity to test whether a language is functional, it would be very disingenuous to not call Haskell "functional" under the purity definition, despite some satellite features it includes.
The telling sign of this fact is that you can actually use equational reasoning and substitution as a method to prove statements about your Haskell programs.
- pron 10y agoHaskell's functions may be mostly pure but they're certainly not total, so they're still not the familiar mathematical concept, and therefore would fail the author's definition as well.