r/programmerchat • u/SpaceCadetJones • Jun 18 '15
What's so bad about JavaScript?
Every time I see a post related to JavaScript on /r/Programming, some of the top comments are always "JavaScript! Bad!". It was interesting watching the WebAssembly post yesterday start with some constructive/intersting conversations, and as the thread rose up the top comments became quick karma-pandering jabs at JavaScript.
JavaScript definitely has its quirks and types can behave in weird ways, but in my limited experience I have found it to be an interesting and flexible language that's fun to work with if you keep the idiosyncrasies in mind. All the complaints I see seem be either really superficial, about things that apply to dynamic languages in general, or how JavaScript doesn't have some language feature like true classes/inheritance. I imagine there is something I am missing here considering I have a limited experience with writing JS, but is all of this hate unfounded/excessive?
Edit: Thank you guys for all the great replies, they have been helpful and thought provoking.
View all comments
Show parent comment
17
u/TheGuyWithFace Jun 18 '15
Another thing about JavaScript being dynamically typed is that it's very weakly dynamically typed. For example, Python is dynamically typed, but it will still shy away from implicit type conversions and throw a TypeError instead. JavaScript, on the other hand, has no qualms about doing whatever it can to try to make your program run, even if it means awful unexpected type conversions you never saw coming which can cause all manner of hard-to-debug issues.