4 ms·
> Our hardware has state. Any IO is a side effect, so what's the non trivial use case for "pure functions" all the way down? I think James Mickens in The Night
by delta_p_delta_x 3y ago
> Our hardware has state. Any IO is a side effect, so what's the non trivial use case for "pure functions" all the way down?
I think James Mickens in The Night Watch[1] puts it best:
> Pointers are real. They’re what the hardware understands. Somebody has to deal with them. You can’t just place a LISP book on top of an x86 chip and hope that the hardware learns about lambda calculus by osmosis.
[1]: https://www.usenix.org/system/files/1311_05-08_mickens.pdf https://www.usenix.org/system/files/1311_05-08_mickens.pdf
- lupire 3y agoThat just means a compiler is required. What percent of your last program was written in register move commands?
- trealira 3y agoYou could say the same thing about variables, expressions, statements, and structured programming. It's a lot higher level than assembly language or machine code programming. > Registers, addresses, and machine instructions are real. They're what the hardware understands. You can't just place an ALGOL book on top of an IBM 709 and hope that the hardware learns about expressions, variables and records by osmosis.