Common Lisp has quite a few equality functions: eq, eql, equal, equalp
Re:Fun with JavaScript Arrays
by hcarvalhoalves on Wednesday June 12, 2013 @05:11PM
(#5870770)
The point is not what "==" should do. The point is you have even two equality operators - with subtle differences - and still no way to compare two arrays by value without boilerplate, which should be trivial.
Off the top of my mind:
In Python, '==' on arrays compares elements.
In Java, '==' on arrays compares the objects themselves. You have to use equals() to compare the elements.
In C(++) arrays, '==' compares the objects. But for std::vector, it compares the elements.
One could argue it's a language choice more than a screwup.