19

Why do people hate javascript?

Comments
  • 17
    'Cause it's apparently cool to hate what's widely used. It's not JavaScript that sucks, it's people's incompetent usage of it.
  • 6
    i dont

    wait

    hold on

    error in async task
  • 1
    all types are objects
  • 8
    People use it where they shouldn't because that's the only thing they know.
  • 3
    Have you seen what google has to do in V8 to make it some what fast?
  • 2
    @kamen Well said!
    ----
    I think just hating JavaScript in general is stupid.
    JavaScript has great possibilities if used correctly and for the appropriate projects and for example TypeScript solves a lot of its weak spots (cleaner, more maintainable code, largely prevents mistyping bugs).

    Like with all interpreted programming languages, it is important to know when it's appropriate to use an interpreted language and when to use a proper "compiled language". For example I'm not a huge fan of JavaScript approaches for native applications.
    It does not matter how many optimizations an interpreter has to do, you can feel the difference in responsiveness and performance.
  • 1
  • 2
    the same reason people hate cancer.
    we're still looking for the cure
  • 1
    Because it’s too powerful. People who aren’t good at programming need to be limited so that they don’t do bad things, but JavaScript doesn’t care if you do bad things.
  • 3
    a number of design flaws. for example,

    - all numbers are floats, integers don't exist

    - NaN is inconsistent as hell

    - the same operator for string concatenation and addition in an untyped language, along with javascript's habit to simply cast numbers to strings if needed

    ... and the list goes on and on. the fact that sites like wtfjs.com exist tells you quite a story already.

    sure, people have found ways to work around those quirks and flaws. but that doesn't change the fundamental flaws in the language itself.
  • 3
    @devios1 with that argument, C++ and assembly would be the most hated languages.
  • 3
    @git-gud Your arguments against it are really just what I'd call quirks. Those things almost never bother me in practice. They might cause the occasional easily caught and easily fixed bug, but are hardly reason enough to hate a language.

    I believe people who HATE JavaScript do so primarily because of the fact that it is a dynamic language with almost no restrictions and allows too much flexibility than some people are comfortable with. And certainly they have a point—you can write some absolutely terrible code in JS.

    It's a double-edged sword: I love having the flexibility when I'm coding something myself, but I often hate the crap that I inherit from other people. Such is the nature of dynamic languages I think.

    C++ is very powerful I agree but in a very different way. But since it's statically-typed, my argument doesn't really apply there. I'm not even going to touch assembly.
  • 4
    From a security standpoint, it's horrifying.
  • 1
    @devios1 ok, so you meant freedom in the language itself - not freedom to do with the language whatever you want. my bad.

    yes, you're correct. but that's not necessarily an argument for it; a tool that is hard to learn should also offer a certain reward for mastering it, otherwise it's more a downside than an excuse..
  • 1
    @irene dynamic typing even more
  • 0
    Admittedly, I've only worked with it through school projects.
    But I hate it.
    I do not like how it seems cobbled together at its base, nor do I like how complex the syntax becomes when I start using JQuery, AngularJS, or Node. I don't like how Node packages seemed to be installed loose and in a neat compressed file. I don't like how most major pages I visit seem to have errors in their dev console relating to JS. I don't like how I can't seem to get a good handle on any code format for it (unlike when I write SQL queries, Java, C++, assembly, or Ruby). And I don't like how I have to use it in the React-Native app I have to build.
  • 0
    I was talking with someone about this last week and I summed up what bugs me the most about it in this pen:

    https://codepen.io/ltlian/pen/...

    I'm ok with dynamic typing, but the way it silently "takes care of" stuff for you has cost me a few hours of magic debugging. I'd prefer for it to just throw on stuff like in that pen.

    I'd like to try typescript more, but (and I'm saying this as someone who hasn't used it on a larger pfoject) it feels a little jury rigged.
  • 2
    that's why lmao
  • 2
    @Wiciaki That is absolutely hilarious
  • 0
    @Wiciaki This guy has too much time on his hands, haha! Great find, mate
Add Comment