2 ms·
It's important that we separate the concept of a language and its implementation. You cannot define a pure language using an impure language, but what type of l
by runeks 9y ago
It's important that we separate the concept of a language and its implementation. You cannot define a pure language using an impure language, but what type of language you use to implement a pure language is up to you.
- s_ngularity 9y agoI fail to see how you couldn't specify a pure language using a pure subset of a sufficiently expressive impure language.
- Retra 9y agoPurity is not a really property of functions, but of optimizations. A pure function is simply those functions for which a "pure optimization" is desirable, and that ultimately depends on what you care about. Every impure function can become pure just by finding a context where the side-effects are moot. (Redirect all output to /dev/null and suddenly you won't care if your printf calls get elided or memoized.)