Reading the few comments here is really interesting.
Every-time there is a discussion about Dart , people talk about Flutter... they very rarely talk about Dart on the Server or on the Web...
A while ago I considered using Dart to build a Web API. I was shocked by the non-existent ecosystem around this language.
The Redis package has been un-maintained for almost three years now, and Angular Dart is always a few version behind the TypeScript version and doesn't support SSR.
I was also very surprised that Google during dart conf never commented on using Dart on the server but instead always insisted on using it for their clients (Web and Mobile). I think I'm not lying by saying that a huge part of Google runs on JVM , Go or Python but definitely not on Dart VM.
For me Dart is the language that developer needed , but never wanted to use. It failed miserably when it was introduced few years ago, since then JavaScript took off and has become almost a universal language.
This is very frustrating seeing how much the language is efficient and well structured but it the same times doesn't mean much now seeing how mature JavaScript is becoming.
For me Dart took long to become what is it now , and today the only thing that would make people using this language is really Flutter.
Beside that , I'm afraid they are very little reason to use this language.
I think what killed Dart is that they emphasized their plans to make Dart a first-class scripting language of Chrome, so that you could use <script type="text/dart"> instead of JavaScript. This had a lot of backlash from literally everyone, I think mostly because they were bit too hard by IE doing the exact same thing just a few years before. Only after a few years the Dart team changed courses and said "never mind about that VM-inside-Chrome thing, we're just going to compile to JS like everyone else" but it was too late and nobody cared about Dart anymore and all the excitement and enthusiasm was gone. I think people don't realize just how much excitement and enthusiasm from a potential community makes or breaks a project when it's first announced.
Flutter is probably the last attempt to get some Dart popularity.
When Dart came out, Google build it to improve on JavaScript, by replacing it with a whole new language. Microsoft built TypeScript to integrate with JavaScript. I thought, "MS, right? Cobbling together some JS add-on, who will use that? Better get a whole now language that doesn't carry around that baggage from JS :D"
I think Dart brought not enough new/better on the table, while having a worse JavaScript-interop than TypeScript. I mean it doesn't even have non-nullable types, which seems to be a standard feature in modern type-systems (Rust, Flow, TypeScript, Reason, etc.)
My feeling is, some people will hype it a bit, because Flutter has a better architecture than alternatives like React-Native, but with projects like Fabric and Reason, nobody will care about it in a few years.
But well, I also was wrong with my TypeScript prediction :D
I was a backend/cli developer for Dart, most of us were ignored when we asked for support in helping build out the Node.js aspect of Dart. So many left. I still maintain my few libraries but I lost of a lot of interest when they went full throttle on frontend only until it failed.
I hope Flutter restores some popularity. If it does, those libraries will start getting updated.
Well, google itself calls it now 'a client-optimized language' and product manager of Dart is also a product manager of Flutter at the same time, brought in from Microsoft. Tells you everything you need to know where they're aiming - where React (Native) is. The farm is bet on Flutter's success now, it seems.
It just doesn't provide enough value over Flow or TypeScript for most people. I'd love to use Flutter, but the tools I want to build I need to be desktop apps. Not everybody is focused on the app store gold rush.
I mostly spend my days writing Go (previously Python) and when I tried Dart I really liked it. Could basically start coding and be productive without even looking at language documentation (VSCode has a nice Dart plugin which tells you what to do and what not to do).
In my case, I was trying out Dart because of a Flutter (probably majority of people are now looking at Dart because of Flutter) and I found it really fantastic. I love the tooling where you can just use their CLI to build/test the application without complex IDEs like XCode or Android Studio.
If you want to try building a mobile app then definitely go for Flutter+Dart, even if you don't need to support both Android and iOS I think it's just much more easy to start with than alternatives (RN/Swift/Android Java).
How does your experience with Dart compare to TypeScript in VS Code? I haven’t tried Dart yet but my TS experience sounds similar to what you described.
> If you want to try building a mobile app then definitely go for Flutter+Dart, even if you don't need to support both Android and iOS I think it's just much more easy to start with than alternatives (RN/Swift/Android Java).
How is it easier? You can literally start your React Native development by opening up https://expo.io and scan a QR on your phone.
Congratulations to the Dart team on that important milestone! Dart is already by far the most productive cross-platform web technology I've ever worked with, and it's getting even better with each new release.
Absolutely love the language, tooling, and "batteries included" mindset. Everything "just works", and is solid, lightweight, and thought-out. Compared to many other languages/ecosystems I've worked with (not going to point fingers), Dart feels like an island of sanity and productivity.
Flutter seems like the killer app that could revive Dart. In comparison:
Javascript
For mobile with React: no AOT compile. Relies on loading the entire JS VM which adds startup time and can require bundling a large library on Android. Cannot easily author customized components that render at native speeds.
C#
For mobile with Xamarin: No hot reload. Dart having its origin as a JS interpreted language had the foundations to be both dynamic and AOT. C# might not ever achieve this?
Kotlin, Java, Swift, Objective C:
Not cross platform.
C++:
Is cross platform. No hot reload. Very unfriendly to modern development and fast iteration.
I don't actively work in mobile. I just like following developments in language technologies, so correct me if I'm wrong.
Depending on how far you want to stretch it Kotlin is cross-platform-ish.
You can write Kotlin that compiles to both JVM and JS, and KotlinNative claims to be able to then also compile that to native.
It's hard to do, and there's a major lack of abstractions even within the standard library, but technically possible. I could easily see a future where your business logic is portable kotlin and then you have platform-specific UI layers.
> The other is an interesting quality-of-life change for Flutter developers, which allows creating an instance of a class without the “new” keyword. The goal of this change is to make Flutter code more readable, less clunky, and easier to type, but the principle applies to all Dart code. There have been plenty of other improvements happening under the hood, as can be seen in the official changelog.
To me it seems kind of odd to design the language towards a framework. Then again, that framework is probably the only thing increasing the number of people using Dart so it does make sense to make using the framework as clean and easy as possible.
There's always a certain amount of affinity between languages and frameworks. Few languages succeed with a compelling framework or "killer app", and few frameworks succeed without really taking full advantage of the language.
In this case, we've been talking about removing "new" for ages, well before Flutter existed. It honestly never really made much sense in Dart. Flutter wanting it helped tip the scale and get consensus on the team, and now that we have it, it really does benefit all Dart code, even non-Flutter stuff.
Server-side Dart is still there, but not getting a lot of support from Google, as it's not their primary focus. The renewed effort going into Dart because of flutter has also allowed AngularDart[0] to gain some of the benefits (better tooling and IDE integration). AngularDart 5 will actually be a huge quality-of-life improvement as they are killing the Dartium browser fork, and instead doing incremental-compiling to javascript with dartdevc.
Dart is really interesting. It's a cool programming language, managed by some incredibly smart people. It could have been what TypeScript is today, but failed dramatically due to a lack of pragmatism and an outright loathing for JavaScript.
What soured me towards Dart is its continued history of ignoring community input. I remember when it was announced--the original "Hello World" transpiled to JS was around 70kb. 8-years later, and after all the user feedback (and shock in the original HN announcement), it's now around ~80kb.
Why do this? Why continue to play so poorly with JavaScript? Dart2js is an indefensible Rube Goldberg machine that no human being can reasonably understand or debug.
I'm really not a fan of Dart's type system. It feels ancient to me. From what I can tell, there's no sum types, I don't see any way to bound generics based on interface/typeclasses/traits or some other equivalent concept on the docs, it has no non-nullable types. Am I wrong? Why would I want to use a type system that lacks expressiveness?
Paraphrasing Qc Na: Subclasses are a poor man's sum type. Also, sum types are a poor man's subclasses.
:)
But, yes, some nicer notation for declaring a sealed family of types would be nice along the lines of case classes in Scala. It's something we've talked about a bunch but haven't had time to get to yet.
> I don't see any way to bound generics based on interface/typeclasses/traits
It uses the same syntax as Java:
class Foo<T extends Bar> {
T thing;
method() { thing.methodOnBar(); }
}
This is exciting. Dart is vastly underrated due to some bad press garnered around its announcement. I'm somewhat disappointed that they've reoriented to focus aggressively on front-end and dropped their custom runtime, but I understand this was mostly dictated by market realities. After they re-establish a foothold, I look forward to the return of a fully-fledged Dart environment and ecosystem.
Dart VM is very much alive, nobody dropped it - it's used by Flutter to run Dart code, used by all Dart CLI tools (and Flutter CLI tools too) and on server side underneath pub.dartlang.org (and used on server by some other companies too).
> ...announcing Dart 2, a reboot of the language to embrace our vision of Dart: as a language uniquely optimized for client-side development for web and mobile.
I think that I would find Dart a lot more compelling if it emitted WebAssembly instead. There aren't a lot of languages that can compile to WebAssembly at the moment.
I work for Google on Search Ads 360 (formerly DoubleClick Search). All the frontend code I write uses Angular Dart and I love it. The best thing about it is the Intellij integration. I've never worked with an editor with semantic auto complete and jump to definition, so it's unbelievably awesome. Static analysis catches tons of errors, dev cycle is super short even for our giant codebase.
I have some experience with React. My impression is that the React model is easier to understand and use at first, but may run into issues as the project grows. I have only ever worked on solo projects from scratch in React, and only ever on multiple 100k loc projects in Angular Dart.
> The other is an interesting quality-of-life change for Flutter developers, which allows creating an instance of a class without the “new” keyword. The goal of this change is to make Flutter code more readable, less clunky, and easier to type
Wait, not typing new accomplishes all those amazing things? Here i thought it was just three letters, which showed intent - hence easier to grok the surrounding code
You'd be surprised. In Flutter you construct new objects _all the time_ and mostly inline (think React without JSX). The `new`'s really do get tedious when you're making a tree like:
> which showed intent - hence easier to grok the surrounding code
There was some concern that removing "new" would make it less obvious that an object was being constructed. In practice, though, it's been totally fine. The fact that the thing you're invoking is a class (and hence a capitalized name) seems to be sufficient signal that "you're making an object".
Also, several other languages already work this way: Python, Scala, Kotlin, etc.
When you’re creating a big tree of component objects in pure code (without DSLs, macros, or something like JSX), omitting the new keyword is pretty nice.
Dart's history of breaking on browser updates because of weird technical decisions really soured me on the idea of ever using it. It's apparently a really good language for native targets, but for the web...
I can't really blame the language designers, but it's a good example of how if your goal is to cross-compile you have to be very careful about how your language is going to interact with the realities of the platforms it runs on. The idea of my deployed websites or apps breaking every couple browser releases really bums me out. (I've had to deal with it with other cross-compilers too.)
Between Javascript and TypeScript on the front end and Kotlin on the back end, I don't see any area where Dart could ever grow to a meaningful mind share.
>we were able to ship a full-featured experience that is fully interactive in one second on modern devices and under five seconds on a modest mobile device on a slow 3G network
Somehow, loading a text newsfeed in less than 5 seconds is an achievement in lightweightness. Sigh.
I wouldn't be interested in Dart at all if it wasn't for Flutter. I can't help but wonder if there will be Flutter bindings implemented for other languages sometime.
This seems unlikely because most of the Flutter stack is implemented in Dart, except for the low-level graphics library. It would be more of a fork / rewrite.
Right now, in what concerns iOS and Android, Qt and Xamarin also compile to native, use mature languages (JS, C++, C#, VB.NET, F#), can also target desktop and have an endless list of libraries to choose from.
Also Chrome team is quite interested in making PWAs succeed on mobile Web, and they have Microsoft on board with them, given how JavaScript has first class support on UWP.
With Dart2 going through LLVM to make ARM binary code for iOS and Android (and Fuchsia), I imagine it would be trivial to emit WebAssembly as well. Writing Dart to make WebAssembly code is far more direct than writing C# and running MSIL on top of a micro .NET runtime (which is what the Blazor project is doing).
[+] [-] wnsire|7 years ago|reply
Every-time there is a discussion about Dart , people talk about Flutter... they very rarely talk about Dart on the Server or on the Web...
A while ago I considered using Dart to build a Web API. I was shocked by the non-existent ecosystem around this language.
The Redis package has been un-maintained for almost three years now, and Angular Dart is always a few version behind the TypeScript version and doesn't support SSR.
I was also very surprised that Google during dart conf never commented on using Dart on the server but instead always insisted on using it for their clients (Web and Mobile). I think I'm not lying by saying that a huge part of Google runs on JVM , Go or Python but definitely not on Dart VM.
For me Dart is the language that developer needed , but never wanted to use. It failed miserably when it was introduced few years ago, since then JavaScript took off and has become almost a universal language.
This is very frustrating seeing how much the language is efficient and well structured but it the same times doesn't mean much now seeing how mature JavaScript is becoming.
For me Dart took long to become what is it now , and today the only thing that would make people using this language is really Flutter.
Beside that , I'm afraid they are very little reason to use this language.
[0]https://github.com/dartist/redis_client/tree/master
[+] [-] sbjs|7 years ago|reply
[+] [-] k__|7 years ago|reply
When Dart came out, Google build it to improve on JavaScript, by replacing it with a whole new language. Microsoft built TypeScript to integrate with JavaScript. I thought, "MS, right? Cobbling together some JS add-on, who will use that? Better get a whole now language that doesn't carry around that baggage from JS :D"
I think Dart brought not enough new/better on the table, while having a worse JavaScript-interop than TypeScript. I mean it doesn't even have non-nullable types, which seems to be a standard feature in modern type-systems (Rust, Flow, TypeScript, Reason, etc.)
My feeling is, some people will hype it a bit, because Flutter has a better architecture than alternatives like React-Native, but with projects like Fabric and Reason, nobody will care about it in a few years.
But well, I also was wrong with my TypeScript prediction :D
[+] [-] Daegalus|7 years ago|reply
I hope Flutter restores some popularity. If it does, those libraries will start getting updated.
[+] [-] skybrian|7 years ago|reply
[+] [-] Keyframe|7 years ago|reply
[+] [-] Sophistifunk|7 years ago|reply
[+] [-] scarface74|7 years ago|reply
[+] [-] devxpy|7 years ago|reply
JS is not a real language, coming from python.
[+] [-] deforciant|7 years ago|reply
In my case, I was trying out Dart because of a Flutter (probably majority of people are now looking at Dart because of Flutter) and I found it really fantastic. I love the tooling where you can just use their CLI to build/test the application without complex IDEs like XCode or Android Studio.
If you want to try building a mobile app then definitely go for Flutter+Dart, even if you don't need to support both Android and iOS I think it's just much more easy to start with than alternatives (RN/Swift/Android Java).
[+] [-] styfle|7 years ago|reply
[+] [-] solidr53|7 years ago|reply
How is it easier? You can literally start your React Native development by opening up https://expo.io and scan a QR on your phone.
[+] [-] frollpin|7 years ago|reply
Absolutely love the language, tooling, and "batteries included" mindset. Everything "just works", and is solid, lightweight, and thought-out. Compared to many other languages/ecosystems I've worked with (not going to point fingers), Dart feels like an island of sanity and productivity.
[+] [-] dangjc|7 years ago|reply
Javascript
For mobile with React: no AOT compile. Relies on loading the entire JS VM which adds startup time and can require bundling a large library on Android. Cannot easily author customized components that render at native speeds.
C#
For mobile with Xamarin: No hot reload. Dart having its origin as a JS interpreted language had the foundations to be both dynamic and AOT. C# might not ever achieve this?
Kotlin, Java, Swift, Objective C:
Not cross platform.
C++:
Is cross platform. No hot reload. Very unfriendly to modern development and fast iteration.
I don't actively work in mobile. I just like following developments in language technologies, so correct me if I'm wrong.
[+] [-] kllrnohj|7 years ago|reply
You can write Kotlin that compiles to both JVM and JS, and KotlinNative claims to be able to then also compile that to native.
It's hard to do, and there's a major lack of abstractions even within the standard library, but technically possible. I could easily see a future where your business logic is portable kotlin and then you have platform-specific UI layers.
[+] [-] pjmlp|7 years ago|reply
Hot reload is supported, C# has a REPL nowadays and there are workbooks, Swift storyboard style.
There are Java AOT compilers for iOS, at least three that I can remember of.
C++ with Qt/QML is very productive for mobile development.
[+] [-] monocularvision|7 years ago|reply
[+] [-] jetti|7 years ago|reply
To me it seems kind of odd to design the language towards a framework. Then again, that framework is probably the only thing increasing the number of people using Dart so it does make sense to make using the framework as clean and easy as possible.
[+] [-] munificent|7 years ago|reply
In this case, we've been talking about removing "new" for ages, well before Flutter existed. It honestly never really made much sense in Dart. Flutter wanting it helped tip the scale and get consensus on the team, and now that we have it, it really does benefit all Dart code, even non-Flutter stuff.
[+] [-] kyrra|7 years ago|reply
[0] https://webdev.dartlang.org/angular
[+] [-] gonyea|7 years ago|reply
What soured me towards Dart is its continued history of ignoring community input. I remember when it was announced--the original "Hello World" transpiled to JS was around 70kb. 8-years later, and after all the user feedback (and shock in the original HN announcement), it's now around ~80kb.
Why do this? Why continue to play so poorly with JavaScript? Dart2js is an indefensible Rube Goldberg machine that no human being can reasonably understand or debug.
[+] [-] leshow|7 years ago|reply
[+] [-] munificent|7 years ago|reply
Paraphrasing Qc Na: Subclasses are a poor man's sum type. Also, sum types are a poor man's subclasses.
:)
But, yes, some nicer notation for declaring a sealed family of types would be nice along the lines of case classes in Scala. It's something we've talked about a bunch but haven't had time to get to yet.
> I don't see any way to bound generics based on interface/typeclasses/traits
It uses the same syntax as Java:
> it has no non-nullable types.Not yet. :( I hope we can get to them.
[+] [-] cookiecaper|7 years ago|reply
[+] [-] mraleph|7 years ago|reply
Dart VM is very much alive, nobody dropped it - it's used by Flutter to run Dart code, used by all Dart CLI tools (and Flutter CLI tools too) and on server side underneath pub.dartlang.org (and used on server by some other companies too).
[+] [-] lubonay|7 years ago|reply
[+] [-] fullofsid|7 years ago|reply
[+] [-] AdmiralAsshat|7 years ago|reply
https://www.youtube.com/watch?v=6p-Z6TXoN10
[+] [-] parvenu74|7 years ago|reply
[+] [-] irq-1|7 years ago|reply
https://www.dartlang.org/dart-2
> ...announcing Dart 2, a reboot of the language to embrace our vision of Dart: as a language uniquely optimized for client-side development for web and mobile.
https://medium.com/dartlang/announcing-dart-2-80ba01f43b6
[+] [-] Maultasche|7 years ago|reply
[+] [-] mraleph|7 years ago|reply
[+] [-] dfischer|7 years ago|reply
Thanks!
[+] [-] bseidensticker|7 years ago|reply
I have some experience with React. My impression is that the React model is easier to understand and use at first, but may run into issues as the project grows. I have only ever worked on solo projects from scratch in React, and only ever on multiple 100k loc projects in Angular Dart.
[+] [-] syspec|7 years ago|reply
Wait, not typing new accomplishes all those amazing things? Here i thought it was just three letters, which showed intent - hence easier to grok the surrounding code
[+] [-] losvedir|7 years ago|reply
[+] [-] munificent|7 years ago|reply
There was some concern that removing "new" would make it less obvious that an object was being constructed. In practice, though, it's been totally fine. The fact that the thing you're invoking is a class (and hence a capitalized name) seems to be sufficient signal that "you're making an object".
Also, several other languages already work this way: Python, Scala, Kotlin, etc.
[+] [-] lasagnaphil|7 years ago|reply
[+] [-] jorblumesea|7 years ago|reply
[+] [-] kevingadd|7 years ago|reply
https://github.com/dart-lang/sdk/issues/13285
https://bugzilla.mozilla.org/show_bug.cgi?id=1027011
I can't really blame the language designers, but it's a good example of how if your goal is to cross-compile you have to be very careful about how your language is going to interact with the realities of the platforms it runs on. The idea of my deployed websites or apps breaking every couple browser releases really bums me out. (I've had to deal with it with other cross-compilers too.)
[+] [-] hota_mazi|7 years ago|reply
[+] [-] andrepd|7 years ago|reply
Somehow, loading a text newsfeed in less than 5 seconds is an achievement in lightweightness. Sigh.
[+] [-] beefsack|7 years ago|reply
[+] [-] skybrian|7 years ago|reply
[+] [-] pjmlp|7 years ago|reply
Right now, in what concerns iOS and Android, Qt and Xamarin also compile to native, use mature languages (JS, C++, C#, VB.NET, F#), can also target desktop and have an endless list of libraries to choose from.
Also Chrome team is quite interested in making PWAs succeed on mobile Web, and they have Microsoft on board with them, given how JavaScript has first class support on UWP.
[+] [-] parvenu74|7 years ago|reply
[+] [-] jdonaldson|7 years ago|reply
[+] [-] alvivi|7 years ago|reply
I hope so