|
|
|
|
|
by kbd
2879 days ago
|
|
I think a lot of what people found off-putting about Dart is that Google already recently came out with a new language that has become very successful. Announcing another one, which at first glance looks like yet another curly brace language not that far from Java, was a step too far for people to be interested. Nowadays, the only thing driving Dart seems to be Flutter, which again is head-scratching. Like, "Flutter sounds interesting but in addition to learning Flutter I need to learn a brand new programming language for it that's really only used for Flutter?" People only have so much bandwidth for new things and there's already so much to constantly learn in our industry. |
|
> not that far from Java
This is something that hurt us, I think. You can write Dart code that looks a lot like Java, and many of our early public examples did. To make matters worse, for no good reason, Dart 1.0 didn't do any type inference, so even though you could use "var" for local variables, doing so would give you a worse user experience.
But you don't have to write Java in Dart. You can write really elegant, clean code in Dart in a way that Java doesn't enable. You don't have to stuff everything inside classes. We've always had nice terse lambdas, higher-order functions, collection literals, etc.
Here's a random little program of mine:
It's not the most beautiful code in the world, but I do think it's a good bit simpler and cleaner than it would be in Java.