45

Javascript is a horrible language.

I really try to like it but I can't. Even the wonderous node ecosystem can't redeem Javascript's flaws.

Seriously how the fuck could they invent such a bad language and make it so damn popular. Why couldn't they used an existing language's syntax to make life easier.

Comments
  • 10
    Okay but like

    Why
  • 3
    They did use an existing languages syntax. It was going to be scheme for the browser, but they forced Brenden Eich to make it the a C/Java-esque syntax so it'd be now palatable.
  • 6
    It was invented because the author desperately wanted to avoid java(which his superiors wanted to use) , so he hacked something together as an alternative. it's basically the ET game of programming languages - hideous to look at, but really quite impressive considering the circumstances.
  • 6
    If you put Typescript over it, it gets much more beautiful. 😉
  • 6
    When I was in web development, every time I was writing raw js, I felt like writing in some ancient voodoo language... Never liked JavaScript 😒
  • 1
    @PonySlaystation I read the comments to find TS
  • 9
    Honestly my only issues with it are shared with Perl and PHP in that everyone writes shit code for the most part instead of trying to follow best practices. That and the fact that it is not the best language for numerical computations in which case if you are using JS for that we got issues. It shines in a lot of areas. Node and its entire ecosystem bring superpowers to the language, and the new Ecmascript standards really make it stand out in terms of new syntax and conventions. You get pretty much the same constructs as a C styled language, so if you are used to curly brackets why not? Personally, I love it. Try building an mobile app with the horrible apis from Android and IOS and you will see that React Native in js is a godsend. Seriously, opening the camera in 10 lines of js code vs 200+ java is horrible, and I LOVE Java.
  • 7
    I would have liked to have seen more substance to debate to see what you think is bad about it. Most of the "bad" parts are simple to deal with with a basic linter set up.

    @PonySlaystation if you believe types and OO are god's own gift then you will love TS. Fortunately dynamic and functional practices are becoming more mainstream.

    Modern JS has a lot going for it. The prototype based OO is a good idea. Then it has come a long way in recent years with ES6 and ES7.
  • 2
    Try learning it from a good book, don't use online tutorial or (worse) don't try random instructions thinking that it works as Java or python. JavaScript is different, not bad but different.

    When you go deeper and learn from fundamentals, you discover that many things makes more sense in JavaScript rather than in other languages.

    For example, the "this" keyword is more meaningful and logical in JavaScript than in Java.

    Other things are just wrong and they remained for legacy reasons, for example "null is an object" is meaningless but luckily it will not affect your work
  • 1
    Ps. Dynamic types are awesome, if you know how to handle them, they save you a lot of time. I repeat: different !== bad
  • 1
    @crisz Now and then I catch a hint of how powerful the 'this' keyword is and then I lose it. I bought "This and Object Prototypes" from the You Don't Know JS in the hope it will help me understand it.
  • 0
    I've only been using JS for a short time and it's taken me longer than I expected to learn it. Still, the more I learn about it, the more it surprises me with what you can accomplish with it.
  • 1
    Learn it appropriately by reading a good book. JavaScript is an amazing programming language, but you won't get the most of it by following shitty youtube tutorials or random blog posts.
  • 1
    I've been using C, C++ and Python for 10+ years and suddenly I moved to a new work where I had to learn and use JavaScript. I think that it is different, as many say, but it is full of lacks and it's like a pile of hacks to make things work. It's a scripting language used as a programming language.
  • 0
    i hate javascript
  • 0
Add Comment