Hacker News new | ask | show | jobs
by mattlondon 1485 days ago
I think the issue was, what was dart useful for that JavaScript or typescript didn't already solve? You had a new language that needed a separate VM to execute that offered basically nothing that typescript/JavaScript didn't already offer. There was no compelling reason for it to exist apart from "just because" - I think that had typescript taken off a few years earlier then they'd probably not have bothered with dart.

Go brought something new that answered an issue developers were facing: easy concurrency in a high performance garbage-collected language that compiled to a single binary with no dependencies. C/c++ did not offer that, nor did java, nor did python. Go filled the gap in the market.

1 comments

Not to turn this into a language debate, but I think it's worth pointing out that Dart is a completely new language that has a more succinct syntax and more sensible semantics than JavaScript. TypeScript is different in that it intentionally is just JavaScript with type annotations. That makes TypeScript easy to adopt but it also means it inherits a lot of JavaScript's flaws.

For example, in TypeScript you still have nonsense like "this.method = this.method.bind(this)" while in Dart, method tear-offs just work. In Dart it's trivial to implement classes with value semantics that can be used as keys in a Map or Set, which is basically impossible in JavaScript. And so on.

I think most people would agree that Dart is just a much better language than JavaScript or even TypeScript. So the succcess of TypeScript is best understood as building on JavaScript's existing popularity.

> I think that had typescript taken off a few years earlier then they'd probably not have bothered with dart.

I always suspected that Google's investment in Dart was related to the Oracle lawsuit over the use of the Java API in Android. Remember that Dart is also the language behind Google's cross-platform app framework Flutter, which was developed while the Oracle case was still in court.

I suspect that Google wanted to ensure that for Flutter they used a language and API that Google unambiguously owned the rights to, to avoid another debacle.

(Then a better question might be: why didn't they just use Go for Flutter? The technical answer could be that Go is more of a systems language like C/C++ and less suitable for UI code. In truth it might just be a common case of Google starting multiple indepent projects that accomplish vaguely the same goals.)