Hacker News new | ask | show | jobs
by woven 4238 days ago
I evaluated Node, intrigued by the idea of event-driven, non-blocking client and server side code written in one language, but I found it to be a wild ecosystem with dozens of frameworks and not enough support and guidance for them.

I found Dart with its promise to bring some structure and sanity to that approach, including building a language from the ground up to do away with JS's quirks, and it has delivered. I built http://woven.co with Dart and Polymer.

The biggest pain is when you'd like to use a JS lib that isn't wrapped for Dart yet. They're hard at work to make it much easier to interoperate. They're a kick ass team, great docs, first class support in WebStorm, and its future seems bright. There are issues with Polymer like SEO that are inherent in any SPA really, but there are experiments with React-like Virtual DOM diffing and others too.

On the server, the dart:io is powerful and Shelf looks like an awesome set of abstractions for http servers and more that I hope to play with soon.

Dart is treated with heavy skepticism I think often unduly, but judge it for yourself and I think you might be pleasantly surprised.

1 comments

Would you like to see it replace JS? I think many would argue something should before we train an entire generation in the idiosyncrasies of JS.
I would love to see this happen; but I'm just not convinced it will. I just don't see MS/FF ever choosing to build/maintain a Dart VM for their browsers (even though I think it would be a massive step forward for web dev).

(Google should've spec'd a generic VM together with MS+Mozilla and built Dart on top of it; but that ship has sailed!)

I don't think anyone's banking on Dart unseating JS, and it doesn't need to. It compiles to JS to work across modern web browsers while smoothing a fair deal for you in the way of optimizations and cross-browser issues. But that's saying nothing of the real reason folks choose Dart, or JS or any transcompiler or framework for that matter: the ways in which it may benefit you and your projects, relative to your other choices.

In Dart's case relative to JS, I think the language is more sane, debugging easier, the core libraries really powerful, the tooling more uniform, and the ecosystem more organized. I like the idea of one language on client and server, and yet the way it's done in JS-land with Node feels wilder and less approachable than I liked when I researched it some years back. That's just me, and admittedly I don't have all that much experience in the world of JS before I dove into Dart.

There are some tradeoffs of course, the biggest being that you sort of block yourself off from a world of JS libraries and even community to some extent. There's dart:js interop to wrap any JS library, and work being done to make that even easier with js:interop, but I think there'll always be some disconnect. Still, it's about costs versus benefits, and there are many benefits that I think ultimately outweigh the costs.

The point is there are a whole host of reasons to choose Dart, and I think it's foolish for any one of those reasons to be because you think it'll unseat JS. It won't, but there might be merit to it unseating JS in your own workflow.