2 ms·
That's surprising, but really has more to do with the failure of JavaScript's standard library than with being functional. For example, the same is true for OCa
by tomp 10y ago
That's surprising, but really has more to do with the failure of JavaScript's standard library than with being functional. For example, the same is true for OCaml (using `==` reference equality instead of `=` structural equality), but `[1, 2] == [1, 2]` is true in Python (a dynamic language, one that most people probably wouldn't call "functional").
- catnaroek 10y agoIn Python, the actual equality testing operator is `is`, not `==`. The fundamental property of equality is that equal objects can't be distinguished in any way. (Indiscernibility of identicals, aka Leibniz's principle.) xs = [1,2,3] ys = [1,2,3] # are xs and ys equal? ys.append(4) print(xs == ys) # no!