- 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?????)
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.
> It's one of the fastest dynamic languages in existence, considerably faster than e.g. Ruby and Python
I think this is kind of a question of what it means for a language to be fast. The big browser companies have poured a mind-blowing amount of resources into making their JavaScript engines fast. This has made these JavaScript engines faster than other implementations of slow languages that have not had similar resources devoted to performance. But this does not mean "JavaScript is fast" in the sense that the design of JavaScript readily enables good performance, and it doesn't make JavaScript fast relative to actually fast languages.
> Compared to what? It's a dynamic language.
JavaScript's type system is extraordinarily weak even compared to most popular dynamic languages. For example:
$ python -c "print(1 + '1')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'int' and 'str'
$ ruby -e "puts(1 + '1')"
-e:1:in `+': String can't be coerced into Fixnum (TypeError)
from -e:1:in `<main>'
$ node -e "console.log(1 + '1')"
11
> I think this is kind of a question of what it means for a language to be fast [...]
It's significantly faster than most other dynamic languages. It's fast as a compilation target to the extent we can run Unreal Engine in the browser. So I consider the original comment I replied to that simply stated 'Bad performance' incorrect or at least lazy/contextless criticism. If you want to reframe, fine, but I'm not going there :)
Accidental string coercion is a valid point. Also hasn't bitten me in ~10 years of building large JS apps. And JS has many advantages over e.g. Python these days that to me vastly overshadow that downside (better support for FP for one).
(And if you really want that type safety you can use TypeScript, just another great thing to come out of the JS community, you know the one that GPP criticised for daring to provide choice).
> It's significantly faster than most other dynamic languages. It's fast as a compilation target to the extent we can run Unreal Engine in the browser. So I consider the original comment I replied to that simply stated 'Bad performance' incorrect or at least lazy/contextless criticism.
The entire point of my comment is that the statement "JavaScript is faster than other dynamic languages" is lazy/contextless praise.
V8 is fast. Rhino is slow. JScript 5 is really slow. They are all JavaScript. V8 is fast because people really wanted it to be fast and did some impressive cutting-edge work to make it happen, not because the language lends itself well to speed. It is a credit to the skill of the people working on the JavaScript engines that JavaScript programmers nowadays can enjoy decent speed, and AFAIK it's not particularly attributable to any specific features of the language.
I might want to read an article about a language that is fast in principle due to its specification. But the question that actually matters to me is: do actual implementations of a language's specification exist, that I can use, that are fast? The answer is yes for JS.
Whatever flaws JS clearly has, speed is not one of them. All the widely used implementations of the language are fast compared to similar languages.
I'm unsure why you think it matters that this speed came about due to hundreds of thousands of hours of work spent on optimizing various compiles and interpreters. I never see anyone saying "Boy SQL sure is fast, but only because so many intelligent people spent their careers making it fast, so it doesn't count."
Remember, this little argument started because someone described JavaScript as slow. That claim is incredibly disingenuous. No, JavaScript's speed isn't directly linked to the language spec but...who cares?
"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."
One reason was to establish a good standard for all people that you can run your code everywhere without effort.
Our history showed many times is better to create a standard instead of many non-standards because that creates unnecessary complexity on our world. Look at the pipeline concept of unix. More and more companies steal this concept to build real time web applications without having so much state (that is concept is pretty old). Our ancestors created all of the wonderful things like tree, pipes, functional and etc. We are just sometimes too stupid to reuse it.
But it's worse than just being a dynamic language. The biggest problem is the implicit type conversions. If it would at least throw runtime errors when there is a type mismatch, instead of silently converting to another type, it would help a lot.