Live data from Hacker News

Dart Is Not the Language You Think It Is

programming.oreilly.com

31–40 of 143 posts

Re: Dart Is Not the Language You Think It Is

#31
post #12

To me Dart looks like another brick in Google's walled garden. Weakening support for XMPP, Webkit, RSS, and JavaScript. Investment in so-called open technologies like NaCL and DART that are controlled by Google and optimized for Google's platform. Too bad.

Dart compiles to JavaScript, much like CoffeeScript, Microsoft's TypeScript, Haxe and many others, and they still make the fastest JavaScript VM on the planet.

Yes and no, An important caveat that Dart as JavaScript runs in it's own isolate and communicates with existing JavaScript libs through ports. This js-interop code is nearly 500k unminified. And you won't be able to minify all your JS (dartJs + other js) into one lib, because dart js doesn't play well with standard tools. One can certainly interop with js libs, but it's not pretty. Dart is not near 1.0 yet, so there is still time for improvement, but this doesn't seem to be a priority. Dart is great, don't get me wrong, and I've been working with it for several months, but I think this point should be made in fairness. You're really going to want to go all in with Dart and leave your custom js libs behind or convert them to Dart. If you have the luxury of working with just Dart code, then you'll be in for a pleasant surprise at how productive you can be and how fast the Dart VM is.

Re: Dart Is Not the Language You Think It Is

#32
This I didn't get:

"Dart is a source code VM

The Dart VM reads and executes source code, which means there is no compile step between edit and run. As with other popular scripting languages, it’s very quick to iterate with Dart. The Dart VM runs on the command line and servers, and can be embedded into browsers. Just point the VM at Dart source code and you’re up and running!"

By that definition Dartmouth BASIC is a "source code VM" aka an interpreter. Why call it something it isn't?

I think Dart is interesting in its own way, and generally a useful exercise for thinking about how you might write an interpreted language that can run in untrusted contexts, but beyond that I don't "get" the problem it is trying to solve.

Re: Dart Is Not the Language You Think It Is

#34
post #29

I really like the feature set and feel of Dart. My only concern is lack of browser support. As of May 2013, Microsoft Internet Explorer, Mozilla Firefox, Opera Software's Opera browser, and Apple Safari have no plan to embed a separate Dart VM [1]. What would it take to get these vendors to add support? 1: http://en.wikipedia.org/wiki/Dart_%28programming_language%29...

That shouldn't stop anyone. Dart works fine in every modern browser (and IE9), because you can compile it to JavaScript.

Generating minified Dart code is one line and compiling to minified JS is also just one line. If you do one in your build script, you can also do the other. It's a no-brainer, really.

Re: Dart Is Not the Language You Think It Is

#35
post #29

I really like the feature set and feel of Dart. My only concern is lack of browser support. As of May 2013, Microsoft Internet Explorer, Mozilla Firefox, Opera Software's Opera browser, and Apple Safari have no plan to embed a separate Dart VM [1]. What would it take to get these vendors to add support? 1: http://en.wikipedia.org/wiki/Dart_%28programming_language%29...

They don't have to support it, Dart compiles to JavaScript.

Re: Dart Is Not the Language You Think It Is

#36

This I didn't get: "Dart is a source code VM The Dart VM reads and executes source code, which means there is no compile step between edit and run. As with other popular scripting languages, it’s very quick to iterate with Dart. The Dart VM runs on the command line and servers, and can be embedded into browsers. Just point the VM at Dart source code and you’re up and running!" By that definition Dartmouth BASIC is a…

The problem it's trying to solve is that Google's JavaScript optimizing team is hitting the limits of what they can do to speed the language up given the constraints imposed by JS.

They want a replacement language that's more optimization-friendly so that they can continue pushing for faster Web clients.

Given this creator goal, and most programmers' goals of "use a language that better suits my needs," it's not terribly surprising that Dart hasn't seen the kind of community interest that CoffeeScript has.

Re: Dart Is Not the Language You Think It Is

#37
post #33

Dart is exactly the language that I think it is. It is too bad that it doesn't run on many browsers but that isn't going to change. What is the point of using Dart other than to join Google's garden of ugly walls?

Dart runs on IE >= 9, Firefox, Safari and Chrome. Why is that "too bad"?

Re: Dart Is Not the Language You Think It Is

#38
post #13

Earlier quoted context omitted.

Dart's optional typing is effectively a dynamic language that allows you to decorate your source with optional Type info that effectively just acts like documentation for other developers and automated tooling. It's far more readable and concise having it embedded in the language rather than buried and disjointed in the comments. Not to mention it also allows for superior tooling support. I've personally been extreme…

Do you just use Dart on the client side, or also do server side using Dart? I have been using Clojurescript and Clojure for client and server coding, but I might be interested in trying another "one language" stack.

Many of the libraries I've helped write are server-only, you can see a list of them at: https://github.com/Dartist

Although Dart on the server is still in its early stages so you might not find all the libraries you need, e.g. I ended up writing my own Redis Client (https://github.com/dartist/redis_client) since there were fewer mature options. All the server APIs are there for you to build a node-like server, it's just the web frameworks and view engines are currently lacking so you might find yourself having to write more frameworks/libraries than you would otherwise on node (which is a lot more mature atm).

I'm hoping after the Dart team finish the work on integrating the Dart VM into Chrome that they'll focus on the server-side of the "full stack" and provide support for App Engine, incidentally star this issue if you would like to see support for this sooner: https://code.google.com/p/googleappengine/issues/detail?id=6...

Re: Dart Is Not the Language You Think It Is

#39

This I didn't get: "Dart is a source code VM The Dart VM reads and executes source code, which means there is no compile step between edit and run. As with other popular scripting languages, it’s very quick to iterate with Dart. The Dart VM runs on the command line and servers, and can be embedded into browsers. Just point the VM at Dart source code and you’re up and running!" By that definition Dartmouth BASIC is a…

Just like V8, the Dart VM doesn't have an interpreter. The code is directly compiled to (fairly crude) machine code. Later, the hot parts are replaced with better machine code.

Re: Dart Is Not the Language You Think It Is

#40

This I didn't get: "Dart is a source code VM The Dart VM reads and executes source code, which means there is no compile step between edit and run. As with other popular scripting languages, it’s very quick to iterate with Dart. The Dart VM runs on the command line and servers, and can be embedded into browsers. Just point the VM at Dart source code and you’re up and running!" By that definition Dartmouth BASIC is a…

The problem it's trying to solve is that Google's JavaScript optimizing team is hitting the limits of what they can do to speed the language up given the constraints imposed by JS. They want a replacement language that's more optimization-friendly so that they can continue pushing for faster Web clients. Given this creator goal, and most programmers' goals of "use a language that better suits my needs," it's not terr…

That's not the only problem Dart is trying to solve. Productivity and the ability to build good tools for the language are huge factors in Dart's design.

That's why it has libraries, type annotations, a declarative top-level structure, and some of the reason for closed objects. Good tools for Dart are _much_ easier to write than tools for a very dynamic language.

Post reply on HN