Re:“Mostly functional” programming does not work (2014)
by knz42 on Monday June 22, 2015 @08:50AM
(#9757876)
The 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.
Re:“Mostly functional” programming does not work (2014)
by innguest on Monday June 22, 2015 @09:56AM
(#9758308)
So 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.
Re:“Mostly functional” programming does not work (2014)
by davexunit on Monday June 22, 2015 @08:53AM
(#9757899)
That 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.
Re:“Mostly functional” programming does not work (2014)
by TazeTSchnitzel on Monday June 22, 2015 @09:03AM
(#9757952)
> 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.
Not necessarily. Functional language compilers are very sophisticated and do not necessarily compile code the way you might think.