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

Addition, as implemented by Python, is functional. There are no side effects. A fully imperative encoding of addition would be eg. the x86 add instructions. John Backus gave us "functional" arithmetic with Fortran, but realised all values should should be treated this way, not just numbers. I take your point about the iterators being mutated and the loss referential transparency. That's certainly not functional programming.



> Addition, as implemented by Python, is functional.

Sure, but Python wasn't the first imperative programming language. (An aside: that's not strictly true anyway; the error thrown when you do 1 + [] is a side effect.)




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

Search: