News for hackers. Stuff that matters.
Re:N-queen puzzle in 4 lines of Scala by Veedrac on Sunday April 10, 2016 @04:18PM (#11467968)
Addition appeared in imperative languages first. Does that mean addition is imperative?

It's great that functional languages were first to catch onto these ideas, but that doesn't mean that anything else that uses them becomes functional. The interface isn't even functional, since in code like

    foo = iter((1, 2, 3))
    {x for x in foo}
`foo` is mutated. No "true" functional language would accept that ;).
Re:N-queen puzzle in 4 lines of Scala by willtim on Sunday April 10, 2016 @05:58PM (#11468377)
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.
Re:N-queen puzzle in 4 lines of Scala by Veedrac on Sunday April 10, 2016 @06:20PM (#11468456)
> 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.)