I don't understand. What is "overwriting" an operator?

Dave

On Apr 17, 2011, at 7:52 AM, Adam Stankiewicz wrote:

> Hello everyone,
> 
> My idea is to disallow overwriting of === operator, and make 'compare'
> operator implement == instead. Why?
> 
> 1. === means for me that two variables have reference to the same
> object, so there is no point of overwriting it. Many programmers would
> be confused.
> 2. == always caused problems, above change gives it opportunity to
> return to grace.
> 
> You don't know if they are the same object? Use ===. Don't know if
> these objects are the same, but only in eyes of programmer? Use ==.
> Think about == or < as semantical operators, and === as hard-cored
> is-the-same-object function.
> 
> Overwriting === operator would also probably cause problems in
> security (membrane design etc.), but it is only my guess.
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to