3 ms·
> A functional runtime is ultimately built upon an imperative foundation. Not necessarily. Functional language compilers are very sophisticated and do not nece
by TazeTSchnitzel 11y ago
> A functional runtime is ultimately built upon an imperative foundation.
Not necessarily. Functional language compilers are very sophisticated and do not necessarily compile code the way you might think.
- knz42 11y agoThe functional runtime (i.e. not compiler) is built upon an imperative foundation. This is necessarily so as long as hardware computer are built upon state-modifying processors and random access, in-place updatable memories.
- innguest 11y agoSo what? It's Turing-complete so it can simulate any non-Von Neumann machine that can compute. And in fact it does so very well, see Forth, Lisp, and other languages from different paradigms for which there are dedicated processors. If you use an abstraction (your job as a programmer) the innards of the processor should approach inconsequential.
- davexunit 11y agoThat code is ultimately compiled to run inside of a register machine. A language may give you a functional interface to something like disk I/O, but the underlying implementation is inherently imperative. Or how about the purely functional programming language Elm, whose runtime is imperative JavaScript? For the record, I prefer purely functional programming, but it's not the only tool in the tool box.
- TazeTSchnitzel 11y ago> That code is ultimately compiled to run inside of a register machine. It is, but the code barely resembles the code most imperative programmers would write.