3 ms·
If you take out all the “script” legacy (type coercion which was common for scripting languages when JS came out, the initial lack of a module system which led
by diegof79 3y ago
If you take out all the “script” legacy (type coercion which was common for scripting languages when JS came out, the initial lack of a module system which led to all kinds of hacks, the scope of var declaration, etc), JavaScript and its prototype based approach is really good.
In fact I wish that constructor functions, and the class keyword never existed.
You can do the same with Object.create and a function closure, isn’t more verbose and it fits better with the mixed functional/oop approach of the language.