You might as well ask why Brendan Eich invented JavaScript.
Also quoting one of the project founders: "FWIW what we've seen in usability studies is that people who know JavaScript can pick up Dart without even noticing. (Literally, after an hour in a usability study we'd ask people what language they'd been using and they would respond with surprise, having not even noticed that it was a new language."
Whether it was a good idea or not I'll leave for you to decide, but the reason that they landed on is that the Dart VM allows for AOT compilation, which is required for iOS, while still being flexible enough to do Hot Reload.
I would like to consider it a beginning of something better.
It wouldn't be native compiled code (which this says it is), and it would have a poorer language experience plus all the baggage that comes with JS.
>No one uses Dart
You'd be surprised.
I tried Flutter over a year ago and found the instant reloading of code nice and has most of modern features but went back to native as the library support is still non-existent.
The real competitor to flutter is kotlin cross-platform from jetbrains. Most android developers are already familiar with kotlin, unlike dart, and also has great tooling.
I look forward to seeing which one wins mind share as they are well designed options.
> Dart’s flexibility in compilation and execution doesn’t stop there. For example, Dart can be compiled into JavaScript so it can be executed by browsers. This allows code reuse between mobile apps and web apps. Developers have reported as high as 70% code reuse between their mobile and web apps. Dart can also be used on a server either by being compiled to native code, or by compiling to JavaScript and using it with node.js.
Source: https://hackernoon.com/why-flutter-uses-dart-dd635a054ebf
The other things are just icing on the cake: best in class framework, hot-reloading, runs on IOS (until Apple gets irritated), development on Linux, and a more than decent language to write apps in.
Plus who will decide to use this in a market dominated by Electron?
Qt comes with 5, 000 classes for every situation to back you up, before you need to go to the community.
I think that a lot of developers are simply scared of it, without just cause. They believe rumours, without ever actually trying to use the thing. They don't evaluate first.
I look forward for the Electron wave to fade away just as MSHTML and XUL waves died before it.
Yes. It's well-written C++. Any IDE can handle it, but the also have their own which gives you a few more things, like drag'n'drop design.
* Hot reloading
Depends.
Old-school Qt? No. It's more powerful, but can't hot reload.
New-school QML? Yes. But you are limited to QtQuick, which is only on-par with Electron's features.
* Ability to target mobile and desktop, etc.
Yes. Supported targets include: Windows, UWP, Linux, macOS, Andorid, iOS, watchOS, tvOS, QNX, and other embedded platforms.
QT is either GPL which is viral i.e. you have to open source your software under the same license, or quite expensive. Even if you’re working on open source GPL software, free QT edition has less features, esp. on embedded.
it is not.
It doesn't:
> WebView is a component for displaying web content which is implemented using native APIs on the platforms where this is available, thus it does not necessarily require including a full web browser stack as part of the application. [0]
* Dart/Flutter {iOS, Android} [0]
* (Scheme|Lua|C)/IUP {Linux, Windows, macOS} [1]
* (QML with JS)/QtQuick {Windows, Linux, macOS, UWP, Android, iOS...} [2]
* (C++|Rust|Go|Python...)/Qt {Windows, Linux, macOS, UWP, Android, iOS...} [3]
* (TCL|Ada|Haskell|Python...)/Tk {Windows, Linux, macOS} [4]
* (TCL)/Hecl {Windows, Linux, macOS, Android} [5]
* (Scheme|C|JS|Haskell...)/GTK+ {Windows, Linux, macOS, Android^} [6]
* (C++|Python|Ruby|...)/WxWidgets {Windows, Linux, macOS, {Anywhere GTK or Qt run...}} [7]
(^ May not be stable or officially supported)
... All the platforms listed are cross-platform.
Some look native, some don't, but no Electron app does anyway.
Most package to single binary, some need proper packaging.
All are very simple to get started.
Tk has the least features, but TCL is just a shell language, so getting started is ridiculously easy. However, Tk can do things like inject its frames into any running process's window.
QT and GTK+ are the most powerful, which can confuse newcomers. But they're still simple to do simple things with.
I've used all but Flutter in a professional environment (but evaluated it), sometimes as maintainer, sometimes building something new. They're all solid. Different drawbacks with all of them, but there's always tradeoffs in programming.
For a beginner, I'd probably recommend QtQuick or WxWidgets.
[1] http://webserver2.tecgraf.puc-rio.br/iup/
[2] http://doc.qt.io/qt-5/qtquick-index.html
[3] https://wiki.qt.io/Language_Bindings
You ship apps, and they can be in whetever you like. No user cares if the app is in Electron or whatever (except only negatively, as Electron wastes resources).
If Flutter apps run faster and eat less resources, people will go to them, everything else being equal.
More dev currently using Electron will not matter.
It doesn't matter which framework really, any improvement is much better then what we currently have. WhatsApp on Mac currently uses 1GB Memory sitting there doing nothing. Not too bad for an Electron App I guess since Telegram uses 650MB after being opened for 48 hours, but it does sit at 150MB once it is closed and reopened.
And before anyone else say Memory were suppose to be filled, consider that paging actually lower the lifespan of a SSD, I have currently done 2TB of writing over the past few days.
The setup of IDE/building/ etc is harder than it should be.
PyQT has mostly been the unloved stepchild, with third rate support.
Compile times with C++ are awful.
Major breaks between versions (QT4 vs 5 etc).
> If you are shipping an executable, you must include any data and utility programs needed for reproducing the executable (i.e. must provide components needed to recompile with a new version of the library) unless such data and utility programs are normally distributed with the major components of the operating system on which the executable runs
For developers of proprietary software, flutter’s BSD 3 clause license is way easier to comply.
Others have crappy support for different platforms (e.g. GTK and Windows/OSX) and that's for decades, not just because they are new.
None of them has the promise of Flutter: modern JS-like language, dead easy development, simple IDE support, cross platform, nice UI toolkit, hot reloading, and so on.
That would be QtQuick.
Webview is unreliable and not used by electron apps for a reason, you cannot control anything about it. You're stuck with whatever native browser the system has. That's alright for basic things, but hardely what you'd sanely deploy tech that relies upon modern js.
If we want to prioritize a sound type system, why then go for a language that is for the most part Java but with no ecosystem, instead of something like Reason/OCaml, Haskell, PureScript which absolutely blow Dart out of the water as languages; or even if your number one priority is targeting Java devs with something more palatable, why not Kotlin even?
Why give artificial life to a language that was on its deathbed and brings absolutely nothing useful to the ecosystem yet will contribute to the amount of churn suffered in the industry?
Just start creating packages for this language and very soon you'll have a rich ecosystem too.
This is not an inherent characteristic of a language itself, it's something powered by the community and built over time.
The larger community is => the better ecosystem we get.
Re: lacking features. Feel free to submit a request here https://github.com/dart-lang/language
Dart team is already working on some nice additions to the language. If ADTs are something many community members are looking for, I'm pretty sure it'll be added.
> and brings absolutely nothing useful
Dart is a language that's predictable (no WATs), performant, has the best built-in tooling to facilitate quick iterative development, the best package manager and can be used to build web, mobile and desktop apps with high level of shared codebase between them.
It's not the best language by any means but it's already a good language. And it's getting better and better.
It's a clutch on top of JS.
And yes, we can submit feature requests, and the language authors may and may not add them. I'd rather go for a language that further aligns with the expectations of a modern language from the start rather than plead with the authors to turn it into something it's not.
> Dart is a language that's predictable (no WATs),
Ok, so it beats the raw JS with no dev tooling development experience. That's the bare minimum.
> performant
Plenty of performant languages to go around, including many more performant ones.
> has the best built-in tooling to facilitate quick iterative development
What does it bring over any other language with a semi-decent REPL?
> the best package manager
You'll have to expand on this, it's a very bold claim.
> and can be used to build web, mobile and desktop apps with high level of shared codebase between them.
So can any compile to JS language, Kotlin, C#, Clojure, among others, and since you place so little value on ecosystem I'll throw a special mention to Idris in too, which can compile to performant JS, the JVM (no bridge necessary on Android), C (usable on iOS) and pretty much whatever; and almost guaranteed blows any other language you can name out of the water when it comes to modern features and being pragmatic.