Re:Imperative Haskell
by runeks on Wednesday May 31, 2017 @12:02PM
(#14453523)
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.
[ Parent
| on HN ]
Purity 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.)
Re:Imperative Haskell
by s_ngularity on Wednesday May 31, 2017 @06:01PM
(#14456277)
I fail to see how you couldn't specify a pure language using a pure subset of a sufficiently expressive impure language.