News for hackers. Stuff that matters.
Re:Announcing Dart 2: Optimized for Client-Side Development by isoos on Thursday February 22, 2018 @03:58PM (#16441331)
Dart has great client-side support for both mobile (Flutter) and web (compiles to JS, has many differently flavoured web frameworks, AngularDart being the most prominent one). The article talks about it in great detail, check it for yourself.

You can also run server/console programs, which is rather similar to Node. Compared to Node, it has better core infrastructure (isolates, zones), but fewer libraries (basic databases are covered though).

When somebody uploads a Dart package to pub.dartlang.org, the site will run analysis on the package and provides platform classification and quality metrics of the code. It will be running the same thing when its dependencies are updated, which will make sure that you can see an up-to-date analysis all the time.

The language is easy to learn. The core APIs provide a great sense of consistency and good support. For simple programs (which could include a simple SPA with both client and server side) you don't need to import any third-party dependency and get by with the SDK APIs, but there are libraries that help you along the way.

Unfortunately, most Dart developers I know are very busy getting stuff done, so you won't get much social media hype around it.

Re:Announcing Dart 2: Optimized for Client-Side Development by nozzlegear on Thursday February 22, 2018 @04:22PM (#16441504)
I'm a huge fan of Dart and very happy to see this. I haven't been able to use it in any non-hobby projects yet, but I love that Dart compiles to JavaScript on the frontend and runs in a VM without any compilation on the server. A good programming language that works on both the server and the browser is like my "holy grail" of programming.

However, there's one thing keeping me from using Dart more professionally, and that's how surprisingly difficult it is to work with JSON out of the box. For a language that compiles to JS I would expect JSON interop to be as easy as "Json.Serialize" and "Json.Deserialize", but instead you need to fiddle with mirrors, add properties and metadata to classes, extend other classes, monkey around with maps and keys, add build steps, etc. This is a big showstopper when you work with web apps, and I'm slightly disappointed to not read any improvements on this front in Dart 2.0, unless I've missed something.

(Shameless plug, I wrote a very brief summary of my thoughts on Dart -- 1.2, not 2.0 -- after trying it for the first time: https://nozzlegear.com/blog/quick-thoughts-on-the-dart-langu... )

Re:Announcing Dart 2: Optimized for Client-Side Development by munificent on Thursday February 22, 2018 @04:41PM (#16441665)
> However, there's one thing keeping me from using Dart more professionally, and that's how surprisingly difficult it is to work with JSON out of the box.

We've talked about this a lot on the team. We definitely know it's a problem but so far we haven't had enough bandwidth to devote anyone to really digging in and addressing it. (It turns out that redesigning a type system and re-implementing the entire front end takes a lot of work...)

Hopefully once things settle down after Dart 2 we can take another look at this.

Re:Announcing Dart 2: Optimized for Client-Side Development by nozzlegear on Thursday February 22, 2018 @08:06PM (#16443272)
Good to hear it's on your radar, and I certainly don't mean to trivialize how much work is involved in making Json work more smoothly with Dart's type system. I'm looking forward to any improvements that might come down the road after Dart 2!
Re:Announcing Dart 2: Optimized for Client-Side Development by kevmoo1 on Thursday February 22, 2018 @05:44PM (#16442251)
In some cases, there is a trivial one-to-one mapping between a Javascript object and it's JSON serialization.

This is not the case in Dart for a number of reasons.

Many folks are happy with the solution we have – here's an example: https://github.com/dart-lang/json_serializable/tree/master/e...

We're certainly interested in making this better in the future, but as Bob said (https://news.ycombinator.com/item?id=16441665) we're very focused on finishing Dart 2 first.

Re:Announcing Dart 2: Optimized for Client-Side Development by nozzlegear on Thursday February 22, 2018 @08:09PM (#16443288)
Thanks for the link, I remember stumbling on this at some point but don't remember why I didn't use it; I'll give this solution another shot! And like I said above, I don't mean to trivialize how much work would be involved in making Json work better with Dart. I'd love to use this language in my day-to-day work, but the Json story has been the only blocker there.
Re:Announcing Dart 2: Optimized for Client-Side Development by markdog12 on Thursday February 22, 2018 @07:26PM (#16442975)
Another huge Dart fan here. While I love Dart, my complaint is exactly the same as yours, JSON serialization/deserialization. I don't want to think about all the hours I've lost researching various 3rd party packages which didn't meet my needs. In my opinion, it's so important, first-class support should've been done right out of the gate.

Edit: There was a repo for ideas to address this: https://github.com/matanlurey/dart_serialize_proposal

No activity for quite a while

Re:Announcing Dart 2: Optimized for Client-Side Development by jaxondu on Thursday February 22, 2018 @03:55PM (#16441300)
There is a new Google project https://github.com/google/flutter-desktop-embedding called Flutter Desktop Embedding, allow you to use Flutter view in desktop application.
Re:Announcing Dart 2: Optimized for Client-Side Development by kolar on Friday February 23, 2018 @03:04AM (#16444907)
Dart as a language is great. My biggest complaint for dart team is that they have abandoned Polymer Dart. For web we have now Angular which is overkill for small to medium non-CRUD apps or dart:html which is like jQuery with types, just a little bit to low level.
Re:Announcing Dart 2: Optimized for Client-Side Development by jaxondu on Friday February 23, 2018 @03:25AM (#16444977)
There is a Angular Elements project in Angular's 2018 roadmap to make it easy to create web component. This feature likely will be in AngularDart. There is also an early stage project to create light weight Angular to be JQuery replacement and non-CRUD apps.
Re:Announcing Dart 2: Optimized for Client-Side Development by grizzles on Thursday February 22, 2018 @07:42PM (#16443097)
Why don't they make flutter for the web too? It seems like a strange omission.
Re:Announcing Dart 2: Optimized for Client-Side Development by jekyu on Thursday February 22, 2018 @02:27PM (#16440597)
Great News!!!