HACKER Q&A
📣 rlawson

Why isn't Dart more popular?


Played around with a couple of the Google sponsored languages - Go and then Dart. Both exercised different parts of my brain but I feel like Dart has a much lower learning curve for anyone with Java/C# experience. I'm using it with Flutter and it's been great but wonder why it isn't more popular as a general purpose backend language?


  👤 PedroBatista Accepted Answer ✓
Dart should have been dead a long time ago, Flutter saved it.

It was supposed to be the successor of JavaScript, when that ended up like everyone expected, Dart was pretty much dead until Flutter appeared and started to have some initial success.

So.. Dart by itself, what does it offer for developers/industry to change? My take is: nothing.


👤 steve_mcdougall
Just adding on to the other explanations here. Dart has little point outside of Flutter. We have tried to use Dart to create helper tools (which we'd usually do in Python) but because of the fact that threads can't efficiently share memory means it's basically useless for anything that is remotely intensive.

Dart uses a microtask queue which the Dart VM controls. Each process you run is called an isolate, with its own instance of the Dart VM and memory stack. The only way to speak to other threads is to use Send/ReceivePorts which have a massive overhead themselves. In our mobile app we do a lot with many cryptography algorithms. Originally we had to send each item to be encrypted/decrypted/signed to a background isolate to ensure the UI thread doesn't freeze. This is fine, for small requests, but once you reach the realm of tens of megabytes this process becomes slow as all hell. The recommended solution for this is to write the file to disk and just send the file location to the isolate. Which itself incurs IO overhead.

Anyway, our use case be damned, just the fact that because Dart runs a microtask queue with non-sharable memory makes it hard to use for anything other than Flutter.


👤 chrisco255
Dart was initially targeted at web development. If you ask me, the initial benefits of Dart were surpassed by the JS ecosystem. TypeScript is fantastic, the npm ecosystem is rich and full featured and has deep network effects and all that tooling really started to get good and mature within a couple years of Dart launching (ES2015 another big improvement for JS). That left very few benefits for Dart over JS/TS.

👤 Nican
I used Dart for a project some 8 years ago. There used to be an easy to use Dart Editor that I used and one day it just stopped working, and stopped getting updates.

Google did not provide any good alternatives, and I just gave up on the language for the lack of developer support. I have not looked back since.


👤 veidr
Programming languages don't succeed/fail on their own merits; popularity is driven by externalities, the main one being "what can I do with this language"?

Dart seems fine to me; as a person who doesn't really use it, it seems "about as good" as other well-regarded garbage-collected languages I don't use (in my case, C#, Go). So it's not that I think it is bad, and therefore don't use it. It's that it isn't well aligned with the things I want to create.

Sure, you can create CLI apps if you do all the work yourself, but there isn't some big library of Dart packages out there. There seem to be a lot more examples and libraries out there in Go (and Rust, etc).

You can make GUI apps with it, but only if using Flutter does that really make sense.

So if you want to make a Flutter app, or work on Adwords, or one of Google's research operating systems, Dart is probably pretty attractive.

But I think all those people are already using Dart. So it's probably just that there aren't more people who want to work on those things.


👤 cyberprunes
I used dart for a couple projects just around it's 1.0 release. I really liked it back then. They were working on some neat ideas. I remember futures and streams being really really interesting in 2013 or so. Originally Dart was competing directly with Typescript. It wasn't clear who would win at the time. Typescript focused on being a superset of JS and Dart made the mistake of trying to push its own VM into the browser which never really got traction and so transpiling to JS and depending on gwt was the only answer for dart on the web (I think) and the js output was pretty hairy. Dart web was dead. Go was already getting popular on the backend and so Dart had nowhere left to go until Flutter. Dart's fate is now Flutter's fate.

👤 blopker
I’ve been using Dart/Flutter for over a year now building an open source iOS/Android/Web app. In general, Dart is a solid language, and we enjoy writing code in it. The package management, for example is comparable to other best in class managers, like Rust’s Cargo and a huge leap forward from languages like Python. All the tooling (linting, formatter) takes the lessons Google learned from Go and applies them to Dart.

Additionally, It’s both an interpreted (with JIT) and a compiled language. Flutter uses this to hot reload code in development, but also to ship a leaner binary in production. On the server, native binaries are great for CLI tools for easy deployment, and the JIT is great for servers where processes are longer running and performance is more important than process size. Although it’s reasonably fast either way.

That being said, it’s a pretty boring language. It doesn’t have many expressive features to reduce boilerplate. While it does have reflection, no one uses it because it can’t be used in Flutter when compiling native binaries. Very few people are willing to make packages that don’t work in Flutter. People generally resort to code gen, which is clunky and adds another process to development.

On the server, there are not many options. The ‘shelf’ package is the default, but it falls short in many areas, making developers cobble together different packages. There are others, the one I’m watching is Frog[0], but adoption is slow. However, it is pretty much just another Next.js style clone, not adding anything novel to the space.

My hope is that the cloud providers will roll out native Dart support to their FaaS products, so I can at least share my model code between apps and the backend. However, the dream (well, my dream at least) is to have a full end-to-end Dart/Flutter solution that is real-time/reactive and not REST-based. Something like a programmable Firebase where I don’t have to deal with un/marshalling data myself all the time. I think that will get Flutter devs enough reason to move to Dart on the backend.

[0] https://dartfrog.vgv.dev/


👤 lmm
Languages aren't popular by default, they're unpopular by default and need a compelling reason to become popular.

Most new backend languages fail the "what is this giving me that OCaml hasn't had for 20 years" test. (Hell, it's only recently that the question has stopped being "what basic feature that OCaml has had for 20 years is this language missing"). Dart is fine - I actually quite like the language design - but "fine" isn't good enough.


👤 invalidname
There are better languages with better ecosystems. Even the Android team picked Kotlin. It failed going into the realm of JavaScript (Typescript took that).

It's not that it's a terrible language. It isn't. There are just better languages that don't have the burden of Google who is notoriously flaky on supporting failed projects.

Flutter succeeded because the alternatives are worse and because of China which is its main source of traction.


👤 Alifatisk
I am currently learning Dart and Flutter in my free time (using it for a hobby project) and so far, I haven't seen any real use case for Dart alone.

To me, Dart is Flutter. I don't think the Dart team have tried to make their language stand out and show its usage outside Flutter. I mean I enjoy the language a lot, it's really faschinating using it and reading the docs but it doesn't provide any value alone sadly.

I am well aware of all the fullstack frameworks poping up every second, but I think if the team created such framework in the language then that would definitely prove it's capabilities and maybe attract more people.

When I think about it, Ruby and Rails is in a similar situation. The only reason people are learning Ruby is because Rails, but to my understanding (forgot the source) but the team behind Ruby is well aware of this and is trying to prove Ruby's value outside Rails.


👤 LarsDu88
Why isn't zig more popular? Same reason. It does the same thing as c++. Dart does the same thing as c#, typescript, swift, etc.

Why is Rust popular? Rust does something no other programming language offers.

To win in the market, you need to find your niche. You can't just be a 3% better alternative that forces everyone to chuck their existing tools out the window


👤 cheeselip420
What does it offer? Does it have a killer web framework? Great data modeling? May as well just use typescript.

👤 wink
I don't remember the specifics, but Dart didn't really have a good story when it was invented. It was this Google (red flag 1) language that was targeting JS (red flag 2 at the time) and while some few people I had talked to liked it, 8-9/10 people simply didn't see enough benefit to switch. This might have been around the coffeescript days still, so the people who valued small unimportant QoL improvement (yeah, sue me) were already accounted for for the most part.

That's when it already had been not popular and most of us thought it would just vanish, but then at some point Flutter came along. But I can't talk about that time, because I have no clue.


👤 w10-1
As others have said, Dart is Flutter.

What they didn't say clearly, is that Flutter is in a complicated landscape of cross-platform native stacks, including chrome, react native, cordova, xamarin, unity, phonegap, et al. Because it's ground-up, it either mimics the platform components or you use the generic flutter style (or one you build yourself) - lots of work either way, to get results that don't jive with expectations around the demo table. Each stack has enough traction and community to continue, but the pace is nothing like the more standard programming models.


👤 bottlepalm
People were already burned by building their sites in CoffeeScript and Google Closure Tools which no one uses, why would you risk your company on Dart?

JavaScript wasn't complicated enough in the first place to warrant switching to a new language. What JavaScript was missing was typing, which TypeScript took care of fine. Actually more than fine, the typing system in TypeScript is way beyond many languages.

The latest innovation is JSX/TSX which I don't think I've seen anything like it in alternative languages.


👤 aristofun
Popularity is never a result of quality. In any area.

Sometimes it correlates, but mostly it's a matter of legacy, marketing and business decisions (that has nothing to do with dev. experience).


👤 flashgordon
I thought typescript ate dart's lunch. There was a time a typed JS alone was enough. But like most things G it felt like it evolved in isolation from what the rest of the web dev world was expecting (remember GWT?). Dart to me felt like it could have been a framework instead of a (yet another) language. As a language enthusiast I really struggled to get what Dart brought to the table.

👤 darepublic
Over ten years ago when I was in school my prof gave us a heads up that dart would be big and we should start learning it.

👤 fyzix
Google would need to make dart outside of flutter more attractive. I think making alternatives to next.js and Django would move the needle quite a bit.

$10M could pay 20 fulltime devs for 5 years to work on these projects. This investment is miniscule compared to their profits and I think that could do it.


👤 orionblastar
It hasn't been marketed enough for the average person to know what it is.

👤 hsn915
I think people played around with flutter and what I keep hearing from people is that flutter's performance leaves much to be desired.

👤 gitgud
I wonder if there could be an opportunity for a full-stack framework like next.js but using Dart + Flutter

👤 scarface74
Because it’s built and supported by Google and it would be a dumb career move to tie your horse to anything Google creates. It will probably be abandoned.

Google has the attention span of a crack addled flea