Hacker News new | past | comments | ask | show | jobs | submit login

No.

JavaScript, the core language, is OK. Sure, there are warts, like this, lack of a good module system, and weird type coercions.

Most of the bad rap JavaScript gets is because it lives in the browser, and the DOM, with all the cross browser issues that come with that. It's not all JavaScript's fault. In fact, most of it is definitely not JavaScript's fault.




At least as far as I'm concerned, the biggest wart of all is variables that are global by default. That just makes no sense at all...


But this was fixed with strict mode; this is like criticising Java for not having generics, even though generics were added ages ago.

You can still assign/use global variables in the browser, but like the parent says, this is the browser's fault - having to accept old and badly-written code for compatibility reasons.


My biggest problem with JavaScript is that I never can seem to wrap my head around the multiple null/undefined type of values and how to correctly test for them, as well as type introspection. Or, more appropriately, my problem with JavaScript is that it makes that confusing, and I use it just infrequently enough that I forget what I learned last time regarding that. Of course, that's not entirely JavaScript's fault, it just doesn't make it very easy.


I think the majority of complaints about JavaScript are from people who are forced to use it infrequently, and don't quite remember how to use it.


I don't really use null at all. I either just check falsiness, or if there's some chance of the variable being a 0 I check for typeof == "undefined".




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: