Precisely. It has no standard library, instead, it has gazillions of libraries written in Javascript.
Every function written in Javascript instead of C/C++ makes a language slower. Unless you f* up the C code, the C code will run faster. No denying that. It’s the same with PHP. Write a function that walks (JS equivalent is map
) the elements in the array in PHP, and write the same function in C (and embed it in the PHP binary); the second one will run faster (again, unless you f* up the C code). Always.
As I said, it has a hundred rules, and a hundred functions; it should be 100 rules, 100k functions. (I hope we don’t have people smart enough to start discussing the 100k made-up number).
Every function that you have to emulate using Javascript instead of a simple native-function call means slower results.
Also, I didn’t know how to quote that too, but; yes, Javascript is an interpreted language. In the first link you mentioned, it says Just because it gets compiled on every run, it does not mean it is Interpreted.
There is one problem with that sentence. It is the literal definition of interpreted. Every language implementation, including Javascript, that reads the source code or an intermediary code that is not a native executable is interpreted. Mind you, even languages that do not produce operating system level binaries are called interpreted languages.
For example, Swift, C++, C, Pascal, Assembly, are compiled languages. There produce OS-native binaries that does not contain the source code. On the other hand, Python, Ruby, Java are all interpreted languages, because they produce a bytecode that is somewhere between machine code and the source code.
The second link you provided mentions also that the specification does not say interpreted or compiled. Well, of course. If it did, it would be an implementation, not a specification.
So, you can of course move this argument to differentiate between the specification (the grammar rules of the language) and the binaries that process code written in that language; but that would pretty much be a non-practical discussion, because specification is abstract, and is meaningless until you write software that turns that specification into practice. No language specification can specify (shouldn’t anyway) if a language is interpreted or compiled. Because interpretation and/or compilation are binary operations, and have nothing to do with the abstract syntax tree (basically, the specification) of that language.
When the output of a language processor is something that can be run without that processor and the source code, the output is said to be compiled, and the binary that produced that output is called a compiler. Producing an independent binary is the definition of compilation.
An compiler is a binary that goes over all the included code, and does certain checks before running the code. Let’s say you put .
where you should have put ;
somewhere in a file that gets included under certain conditions. Will the binary that runs Javascript code notice that before starting the final run operation, or will it not? Here’s your answer: It will not, not until it actually needs to interpret that file. That is one of the other properties of an interpreted language.
Alas, if you want to believe Javascript is not an interpreted language, you are free to do so.
In the end, yes, ES6 is needlessly obfuscating code, creating more grammar instead of creating more functions. More grammar makes a language richer, but most of the time, not as much as a word/function.