Hacker News new | ask | show | jobs
by sredna 3813 days ago
Exactly. In the browser (and node) it's not really a question of how Dart compares to TS / ES6 (for example), but how Dart + ease of using JS libs compares to TS / ES6 + ease of using JS libs. And of course that makes sense.

TS is a language where the primary goal is seamless JS interoperability. Presumably, it will always make design tradeoffs to maintain that.

Dart is a language where the primary goal is developer productivity. The team decided that it required a clean break from JS to achieve that. The tradeoff being that JS interoperability is harder.

So it's not a great surprise that TS wins in the JS interoperability front. Dart has made big improvements here recently and continue to do so and I expect the gap to continue to close but never quite go away.

Similarly, it's not a great surprise (to me at least) that Dart is a cleaner more productive language. As many have said ES6 has made big improvements over ES5 and coupled with TS has significantly closed the gap to Dart.

I see this trend continuing. With Dart maintaining an edge in language features + productivity and TS with JS interoperability ease, but the gaps in both aspects being small enough that it is a matter of personal choice and what best fits the project.