On Thu, May 14, 2015 at 9:14 AM, Martin Thomson <m...@mozilla.com> wrote:
> On Thu, May 14, 2015 at 5:17 AM, Gijs Kruitbosch > <gijskruitbo...@gmail.com> wrote: > > On 14/05/2015 01:21, Martin Thomson wrote: > >> > >> On Wed, May 13, 2015 at 4:54 PM, Matthew N. > >> <mattn+firefox-...@mozilla.com> wrote: > >>> > >>> "In JavaScript, == is preferred to ===." from > >>> > >>> > https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Operators > >> > >> > >> > >> Ahh, that's where it was hiding. Can we reverse that statement please? > > > > > > Concurring with Mike in the other branch of the original thread, I would > > prefer not to (for non-test code). You've also provided no arguments as > to > > why we should be doing this. > > I thought that this was understood. Crockford offers plenty of > reasons in his book. > > To summarize, == uses implicit type coercion. It says that you don't > care or that you don't know what something is. I've never seen case > where an explicit check is not possible, and does not help make code > clearer. FWIW, I concur with Martin for the reasons he states. I don't think anyone is saying that we should change existing code, but this would be clearer for new code. -Ekr _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform