2 ms·
Well, the reason you don't really see efforts to implement prototypal inheritance in classical languages is because it would be much more difficult than the con
by tikhonj 15y ago
Well, the reason you don't really see efforts to implement prototypal inheritance in classical languages is because it would be much more difficult than the converse. Prototypal inheritance is both simpler and more flexible than classical inheritance, so building the latter on the former is much easier.
Another thing: there is nothing fundamentally wrong with coercing types. The only time you have an issue with this is when you combine overloading with coercion. Particularly, JavaScript overloads + and uses it to coerce values, which is just broken. Either overloading on types or coercing types by itself is fine and neither is clearly superior; the problems stem from having both.
JavaScript also has a standard and multiple compatible implementations; all the cross-browser issues I know of have to do with the DOM rather than the language itself. On top of this, some of the JavaScript implementations are really fast for a dynamic scripting language.
Also, let's not get into Python's many problems and weird semantics. It may not have the "silliness" of JavaScript, but it has plenty of silliness of its own. I say this as somebody who's been forced to use it both at work and in my courses: it's just as confusing as JavaScript was, just in different places.