|
|
|
|
|
by firefoxman1
5233 days ago
|
|
My thoughts exactly. How about: Does it have closures and functions-as-object passing? (amazing feature of js) Does it support prototypal inheritance? (also great) I honestly don't know if Dart does these two, but they're pretty important to me. Does anyone know? Edit: after a little research it looks like the answers are "Yes" and "No". I'd be willing to try it then. |
|
No. Dart has classical inheritance, which by the large number of classical inheritance libraries for Javascript, is still very popular even when prototypal inheritance is available.
I personally abhor prototypal inheritance. It's aesthetically unappealing, hard to reason about, hard to optimise, and turns what is usually a declarative pattern into an imperative one. When most people are approximating classical inheritance anyway, that's a big sign.
It's sometimes nice that objects can differ structurally from their class, but I've never found it that useful.