http://qs321.pair.com?node_id=781450


in reply to What is the best way to compare variables so that different types are non-equal?

eq is supposed to "ignore types" it's just comparing the stringified arguments

eq: Binary "eq" returns true if the left argument is stringwise equal to the right argument.

so two arguments mapped to the same string are "equal".

I think you want something like === in JS¹, IMHO you have to construct this on your own.

Cheers Rolf

UPDATE: repaired broken link to [doc://eq]

(¹) an approach with operator overloading can be found here:
Re: What is the best way to compare variables so that different types are non-equal? (overloading "cmp")