Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kamen69916y'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.
-
@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. -
devios157706yBecause 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.
-
git-gud14186ya 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. -
devios157706y@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. -
git-gud14186y@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.. -
jysk1312256yAdmittedly, 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. -
ltlian21966yI 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.
Related Rants
Why do people hate javascript?
rant
programmer
javascript
question