Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah but javascript has 'use strict' whereas PHP decided that the easter egg "looks like you're using the wrong language!" was more important than actually allowing a 'use strict' to force === instead of ==.


While that's true, JavaScript is still horribly error-prone because of this. The suggestion that JS would be a much better language if the == operator worked more like === in the first place is very reasonable.


I don't think strict mode affects == vs. === Best bet is to use a linter to catch that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: