It has been suggested various times to align the use of the === operator to what JS/TS would do, which came also up again in a recent issue (I don't remember which one), suggesting to replace our special === semantics with changetype<usize>(a) == changetype<usize>(b) in standard library code, which is about the only place where this is of importance. Overall this change would make === and == behave exactly the same for string operands and drop the special meaning of someObject === someObject, replacing it with something else where necessary.
Considering the general confusion introduced by this, I am leaning towards this solution. Thoughts?
It has been suggested various times to align the use of the
===operator to what JS/TS would do, which came also up again in a recent issue (I don't remember which one), suggesting to replace our special===semantics withchangetype<usize>(a) == changetype<usize>(b)in standard library code, which is about the only place where this is of importance. Overall this change would make===and==behave exactly the same for string operands and drop the special meaning ofsomeObject === someObject, replacing it with something else where necessary.Considering the general confusion introduced by this, I am leaning towards this solution. Thoughts?