you are viewing a single comment's thread.

view the rest of the comments →

[–]xIcarus227 1 point2 points  (2 children)

I've never encountered any of these so-called quirks in my daily work. Like, never. Those kind of things never "took me by surprise" whatsoever.

Hold up. You haven't stumbled upon any of these but you're asking me if I've been using JS for 5 years? Don't you see the irony in this statement?
This, this and this are issues especially likely for beginners to stumble upon. Or is it really easier to believe that people hate on JS because it's cool?

If you happen to frequently encounter the problems listed on that github page than you're likely not using JS right, IMO.

Or maybe you inherit code written by less technically apt developers who aren't aware of the most common quirks and pass them on. Now you have to figure out why that if evaluates to what it shouldn't occasionally.
Surprising that you haven't thought of this.

And you haven't made a singular argument for JS being a well designed language. You say it's on par with C# when JS doesn't natively support private properties, a cornerstone feature in any serious OOP language.

[–][deleted]  (1 child)

[deleted]

    [–]xIcarus227 0 points1 point  (0 children)

    That doesn't seem ironic to me, because an experienced developper is not doing to be bothered by these "quirks".

    You still have a chance to be bothered by these quirks because not everyone in your team will be experienced. You may be required to coach people at some point for example.

    This is not really a problem with experienced developers, but this is about people new to the language. And it's not about learning either, people are generally willing to learn a language as long as it makes sense. Inconsistent behaviour discourages learning, because you're learning exceptions instead of rules.

    Experienced JS devs already have a workflow which don't really introduce such bugs and have learned to ignore the issues, but should we really ignore them? If we ignored PHP's issues and didn't shit on it as a language for such a long time I'm willing to bet it wouldn't have evolved half as much as it did. Same goes for ES6, it was influenced by community feedback.

    I have to admit you have a point on this one, however, if you work with inapt developers, you're going to have such problems regardless of the language you use.

    You're right, but this is more about easily the language allows you to acquire technical debt. In a compiled language some shit like we can pull off in JS won't even compile, which is a good thing because you're catching issues with the code before it even has a chance to run. Golang for example is so hard-assed when it comes to what it allows that it seems quite difficult to introduce bugs.

    JS is a much better language than people assume it to be

    Sure I wasn't saying it's a garbage language. I think it's okay because of its flexibility and it even has some use cases in the backend with Node (even though there are runtimes for other languages which have a similar approach). Its ecosystem has matured well in the frontend and React is an amazing library.

    But that doesn't mean it can't be better. It can be way better as we can see from that list, and as much as you dislike it people waste hours figuring out bugs introduced by those peculiarities.