In your opinion, why is Dart a better TypeScript? Interested to hear your view, because my experience was quite different. When I learned Dart, I was mostly annoyed because it was almost exactly the same as TypeScript, but just different enough that I had to look up how to do everything again. Like, I understand that Rust is different from other languages because it brings in a totally new approach to software development, which has its use cases. But when I used Dart, I just wondered why Flutter didn't just use TypeScript, since it looks basically the same to me.
One of the really nice things about Dart in addition to the fact that it’s an AOT compiled language with truly excellent tooling and documentation is the fact that because it’s not a superset of JS it can skip a lot of the messy parts while keeping the best bits.
One good example I like to point to is the idea of mixins.
Comments
I’m also super excited about wasm creating language democracy. I’m rooting for dart myself.
Never used dart until about a month ago for Flutter. Really loving it so far - like a better typescript. So many cool language features.
In your opinion, why is Dart a better TypeScript? Interested to hear your view, because my experience was quite different. When I learned Dart, I was mostly annoyed because it was almost exactly the same as TypeScript, but just different enough that I had to look up how to do everything again. Like, I understand that Rust is different from other languages because it brings in a totally new approach to software development, which has its use cases. But when I used Dart, I just wondered why Flutter didn't just use TypeScript, since it looks basically the same to me.
One of the really nice things about Dart in addition to the fact that it’s an AOT compiled language with truly excellent tooling and documentation is the fact that because it’s not a superset of JS it can skip a lot of the messy parts while keeping the best bits.
One good example I like to point to is the idea of mixins.
Take a look at how Dart does it here: https://dart.dev/language/mixins
Then take a look at TypeScript here: https://www.typescriptlang.org/docs/handbook/mixins.html
You might also be interested in this https://dart.dev/resources/coming-from/js-to-dart
I was once hoping that WASM would get direct access to the DOM APIs, but there doesn't seem to be any progress.
I can’t speak to other languages but for Dart specifically this is a non-issue where you can:
* use the exact same web APIs as outlined on MDN like you can in JavaScript.
* Without having to leave Dart and all of the type safety and tooling you get with that.
* while still being able to compile to WASM.
* With zero runtime overhead in terms of performance
Example of what that looks like here: https://github.com/dart-lang/web/blob/main/web/example/examp...