6 ms·
I disagree. JavaScript is far, far from a perfect language, but if you think it's the worst one out there, you must've not payed attention to it in the past few
by Meegul 10y ago
I disagree. JavaScript is far, far from a perfect language, but if you think it's the worst one out there, you must've not payed attention to it in the past few years. I - as well as most non-self loathing JS hackers - use the ECMAScript 2015 (or later) standard, where the language is relatively feature complete. This allows JS to become a relatively complete OO language should you desire, and it also allows it to act (mostly) functionally. `const` and `let` alone fix many of the ambiguous gripes that people had with JS, and if you truly believe it's still the worst language out there, I encourage you to look at these new developments.
- loppers92 10y agoThe Important stuff is still unfixed For instance: - javascript has just one datatype for numbers, HOW CAN YOU WIRTE A NUMBERS APP WHITH PURE JAVASCRIPT SHIT, WTF?. - Debugging is a hell - No generic language - Slow as hell - Double meaning of many this like undefiend - etc - etc All what you describe above is syntax sugar. I have learning 6 programming languages (c, go, javascript, python, java and php)
- nilved 10y agoHe said it's "one of the worst." And even people who write JavaScript admit that.
- Meegul 10y agoPerhaps it is. PHP is also typically ragged on for being "one of the worst", yet it runs the majority of the web. The common theme between JavaScript and PHP is that it's possible to write some pretty awful code, but that doesn't make it impossible to write _good_ code in either of them. Do we measure languages by the worst we can create with them, or the best we can create with them? It's also easy to be "one of the worst" when there are only a handful of languages that see widespread use. You only need to be in the bottom 5 of 15 or so languages, but my point is that that may not imply that it's a bad language.
- galacticpony 10y agoIt's not about good or bad code, Javascript doesn't really encourage either. It's a bad tool, but it's good enough for the job. It happened to be the only tool available, up until recently. It will take forever for another ecosystem to catch up.
- loppers92 10y agoyou need to learn at least 3 languages that you know exactly what means writing good or bad code with a language. After the time you don't want write code with a poor language. If you have learned a better language. A Software engineer uses always the best tool and not the worst.
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- mintplant 10y agoI've worked on a JavaScript engine and I'll admit that. The language actively fights optimization. Some of this is due to legacy features, some to inconvenient design decisions like mutable prototype chains. I have tremendous respect for everyone involved in getting JS performance to where it is today.
- galacticpony 10y agoThese new features fix nothing, they just add more things that weren't technically needed in the first place. There is no way to "fix" Javascript without breaking compatibility. It will always suffer from its poor initial design decisions, or it will stop actually being Javascript.
- Meegul 10y agoAs someone interested in language design, what design decisions, in your opinion, make JS so terrible? The extremely weak type system?
- bluejekyll 10y agoFor me the extremely weak type system is one thing. In general the language is too accepting of bad code. It's kinda like HTML, "if you can guess at what it's supposed to do, do it." Personally, I prefer stricter interpretation over weaker versions. Another big one for me is "this", which has significantly different semantics than nearly any other OO language out there. I personally find it confusing, and it requires you in many cases to understand the invocation point of a function. I can not reason about all the data related to the scope of the function, in the function, without first taking into consideration all the callers of the function. To be fair though, JS is not the only language that features these flaws. The biggest problem with it is that I'm not really given a choice to use other languages. Yes, there are transpilers, but even with those I almost always need to use JS at some point for integration with other code.
- loppers92 10y ago- Bad Performance - Extremely weak type system - No generic language - Too many abstractions - Double behavior of types - Bad scaling - Extremely bad OOP Implementation (Just 1% of OOP) - the Debugging approach doesn't make any sense - The Community (1000+ Frameworks with almost the same features for what existing standards?????)
- allover 10y ago> - Bad Performance It's one of the fastest dynamic languages in existence, considerably faster than e.g. Ruby and Python > - Extremely weak type system Compared to what? It's a dynamic language. > - No generic language - Too many abstractions - Double behavior of types - Bad scaling - Vague, what does these even mean? Compared to what? > Extremely bad OOP Implementation (Just 1% of OOP) Again vague, what is it lacking? Perhaps it just implements the bits people actually use? > the Debugging approach doesn't make any sense No idea what this means. Chrome devtools debugger is excellent. > The Community (1000+ Frameworks with almost the same features for what existing standards?????) It's a huge community, there're bound to be lots of camps and lots of people trying to crack the same nut different ways. What's wrong with competition? I personally think it's a fantastic community, and find others lacking by comparison.