The web-players have the big disadvantage, that they require the user to install something additional to their browser. Thus they don’t reach all internet users, but only those, willing to invest the extra effort.
Modules must correspond to syntactic units in the language used. – Bertrand Meyer: Object Oriented Software Construction
So we have a language that exists and evolves for almost 20 years now. Because of its monopoly it has grown to the most used language on GitHub. And all bigger organizations come up with their own workarounds to do proper object-oriented front end development.
But due to the growing amount of web users, there is a trend to so-called fat clients. It means that the front-end becomes big and heavy-weight. So how is a simple scripting language the answer to that? Instead, a language that fails fast and scales properly is required.
Reconstructing object-oriented concepts violates the Linguistic Modular Units Principle again (see above).
I mean, wtf? Prototypes instead of classes? I need a whole article to explain all reasons why this is a dumb idea! So just a few words.
First of all prototypes are a special case of initializing objects in object orientation, but not the other way around.
Secondly you can not do proper design on instance-level. You’d have to argue about each single possible case like: “If costumer A…”, “If customers A and B …”, “If customers A, B and C…” etc. Instead you want to argue one abstraction level higher and say something like “If a Customer”. So in your mind you classify the 3 objects A, B and C to be similar. They all belong to the class Customer. Then after you made that abstraction in your mind, you need to throw it away and implement the three objects A, B, C, etc. because JS isn’t capable of classes.
No explicit type system
Having no explicit typing (i.e. you don’t declare a variable has to be a string) has some advances: It’s good for quick and dirty prototyping and easy for beginners to learn.
No visibility constraints
One fundamental concept of object orientation and modularity is to restrict whats visible. It’s known as Encapsulation or Information hiding. This concept is so fundamental, that I don’t want to explain it’s importance in this shot article.
And many more
The language has many more problems, mostly resulting from the missing class system. I won’t explain them all here, but some of them are: No Inheritance, No Interfaces, No Modules, No proper editors (capable of code completion, code navigation, refactoring, etc.).
But there is hope
Almost one year after writing this post, I found this on twitter. Problems are still the same:
— John Arundel (@bitfield) 10. Juli 2015