Hacker News new | past | comments | ask | show | jobs | submit login

> 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




You 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.


That just means a compiler is required.

What percent of your last program was written in register move commands?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: