On Tue, Sep 25, 2012 at 1:22 PM, David Bruant <bruan...@gmail.com> wrote:
> Le 25/09/2012 12:13, Frank Quan a écrit : > > Hi, Brendan, thank you for reply. > > > > > > I mean in common understanding, "a>=b" always have the same result > > with " a>b || a==b ". > Common understanding assumes a and b are numbers. I personally don't > know if there is a common understanding of what 'true > "azerty"' could > mean. > Indeed. For the fun of it, I think that in the context of JS that means `Number(true) < "azerty".charCodeAt(0)`. > > But I noticed that in ES5/ES3, there are several cases breaking this > rule. > > > > See the following: > > > > null == 0 // false > > null > 0 // false > > > > null >= 0 // true > > > > I was wondering if this is by design. > > > > And, is it possible to have some change in future versions of ES? > Regrettably, no. As a complement to Brendan's response, I recommand you > to read the following paragraph > > https://github.com/DavidBruant/ECMAScript-regrets#web-technologies-are-ugly-and-there-is-no-way-back > Changing this in a future version of ECMAScript would "break the web" > (break websites that rely on this broken behavior) > > David > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss