I hope this isn't off topic. What is the draw of Dart? In other words, what does it claim to do special or emphasize over other langauges? Like if you were going to try to convince someone they should give Dart a try, what reasons would you give?
- Cross Compilation (even wasm and js) out of the box
- Simple concurrency model, similar to NodeJS
- Ability to use it on a popular cross platform framework (flutter)
- Hot reload capibilities (has JIT and AOT mode)
- Strong developer tool chain
All of these are built on top of a language that has a pretty syntax and supports many language paradigms.
The biggest con is the (weak) package ecosystem and community.
I think it's also important generally speaking - not just Dart/Flutter, but really any language ecosystem, to not blindly start adding packages. You'll end up with conflicts and Dart is no exception. Sometimes it is sensible to vendor a library into your own source code tree, or just build it yourself ("Own it").
The language is a little nicer than Typescript (though not in all ways), the performance is better and the tooling is excellent. Even better than Go's. And it can be AoT compiled to a self-contained binary or transpiled to Javascript.
The LSP server in particular is amazingly fast and reliable - better than Java IDEs. It's practically instant from typing something to seeing the squiggles update. C++, Rust, Go, Typescript etc. don't come close.
Obviously there are downsides: relatively tiny ecosystem, sometimes weird syntax (why is a match expression and match statement different??), this very annoying issue that I see remains unsolved after 5 years: https://github.com/dart-lang/language/issues/1188
Having developed Flutter apps for a few years now (albeit not full time), I have to say that Dart is simply a pleasure to work in. The language - at least - doesn't hold you back at all. I guess it's kinda like Java should have been.
When coming from TS to Dart, the lack of union types was a huge bummer. But I saw a discussion somewhere that you can achieve something close with sealed classes to model union types combined with exhaustive pattern matching, but Idk.
I'm a heavy user of exhaustive pattern matching with sealed classes, definitely a great feature. You can achieve the same outcome as union types, but it's a lot more leg work, e.g.:
```
sealed class MyParam {}
class Bar extends MyParam { String val; }
class Baz extends MyParam { int val; }
void foo(MyParam param) {
switch(myParam) {
case Baz(val: final val):
case Bar(val: final val):
}
}
```
compared to:
```
void foo(Bar | Baz myVar) {
switch(myVar) {
case Bar:
case Baz:
}
}
```
I hadn't seen the extension_type_unions package, though, I'll check it out.
Modern, but sane syntax (readable), good defaults (strong typing, null safety...), good-enough runtime performance, good APIs and tooling out of the box, cross-platform (also hot-reload on some, AOT). The list goes on, what specifics do you care about more?
> The problem is Google cut significant funding to Flutter
Just to be clear, Google slashed teams across their entire organization, not just the Flutter / Dart team. So it wasn't like Google targeted the Flutter / Dart project
> it's not clear if it'll be supported for much longer
> Google's lack of commitment is concerning
I had similar feelings. When looking this up, it showed that Google continues to actively develop and invest in Flutter, with regular updates, new features, and performance improvements being released for both Flutter and the Dart language.
The official Flutter roadmap has been updated through 2025
If Flutter didn't exist would Dart be worth looking into? ATM It sounds like Dart w/Flutter) is good for "making native apps" and that maybe doesn't excel outside that niche?
I mostly use it in a non Flutter context and yes, incredibly strong recommendation from me there too. It’s my new default language for the past few years for a reason.