Dart: Deviating from the script

Rob Marvin
January 16, 2014 —  (Page 1 of 4)
Change happens gradually. Google knew that back in 2010 when, frustrated with perceived fundamental flaws in JavaScript, it first decided to create Dart, a more structured yet flexible programming language.

JavaScript was and still is entrenched as a lingua franca of sorts in Web development, but after three years of buildup and open-source collaboration, Dart looks to redefine the programming landscape.

(Dart’s release: Google says Dart 1.0 is ready for wide Web use)

Dart 1.0 has been widely available since November, and its documentation and tools are completely open source. The question now is whether Dart is all it’s cracked up to be. Whether the language sees more widespread adoption or not depends on the effectiveness of its development tools and resources, and how Dart’s changes in structure, syntax and libraries stack up against JavaScript.

Going off-scriptWhy Google created Dart
Dart was designed to make it easy to write modern app-development tools capable of high-performance implementations. Formerly known as Dash, Dart is a class-based, object-oriented language with C-style syntax that also comes with a programming environment, a set of libraries and a virtual machine.

According to Google software engineer and Dart co-creator Lars Bak, the Dart project started two and a half years ago with two distinct goals: increased programmer productivity, and faster execution. And he believes Dart has achieved them.

“There’s a very fast turnaround cycle from when you change the source code until when you run the code,” Bak said. “In our case, if you use the VM, we changed the source code to program right away. If you’re used to Java or another programming language where you have to go through tools before you can run the program, in Dart you can run them right away.”

Lowering that source code runtime threshold leaves Dart free of what Bak called defensive programming. He explained that when dealing with a long tool chain, developers often fall into the habit of playing it safe. They spend an inordinate amount of time examining the code before compiling and running the program, instead of having the freedom to experiment with code.

(A leaked 2010 e-mail laying out Google’s Dart strategy)

Dart’s other overarching goal of faster execution is targeted specifically at the front end of browsers, spurred by longstanding frustrations with JavaScript’s shortcomings in writing larger Web applications.

Bak’s team created Dart with that goal in mind, equipping the language with more structure in the form of classes, mixins and interfaces, along with a system of libraries he believed will appeal to programmers writing larger bodies of code. While the syntax of Dart is largely familiar to JavaScript, he pointed out one particular feature called Optional Typing that lends itself to writing larger Web apps.

“When you start experimenting with a program, you can write code without types, and if you get closer to finalizing a module, you can put in types in the interface,” Bak explained. “So if our team members are using your interface, you can actually validate your code against that interface. So you can be experimental in the language but also harden it up and use types as a way of ensuring that people are only using the code in a certain way.”

While Dart’s improvements in executing larger applications paint it as an appealing option for modern Web development, JavaScript is far from an unchanging language. Thanks to the forthcoming update to JavaScript’s standardized form, ECMAScript, Dart has its work cut out for it. The update addresses many of Google’s criticisms of the widely adopted language, particularly in regards to writing larger, more complex applications.  

ECMAScript 6, targeted for implementation in December of this year, is “really focused on scaling up JavaScript as a language to encompass the full range of what people are doing with it today, to develop complex applications and libraries,” said Allen Wirfs-Brock, Mozilla research fellow and project editor of the ECMAScript language.

“ECMAScript 6 takes JavaScript from the classic scripting language thinking of writing programs of a few hundred lines to do simple manipulations of resources, to a full-featured programming language capable of all sorts of complex features.”

Related Search Term(s): Dart, Google, JavaScript

Pages 1 2 3 4 

Share this link:


01/16/2014 12:25:43 PM EST

Interesting to hear the comments on Dart. From all of the benchmarks I've ever seen, Dart code (event running in the Dart VM) is generally slower than the equivalent JS. Which is fine. Just leads you to conclude that Dart is about the syntax more than the speed. There are literally dozens of languages out there doing the same type of thing now. Some older. Some newer. Not much to get excited about unless you just love to drink Google KoolAid

United StatesDigDug2k

01/17/2014 04:21:43 PM EST

@DigDug2k you are mistaken. you even mentioned a VM built around the language and then ended up with it's "about syntax more than speed". this makes me feel a little uncomfortable.

United StatesV.

01/20/2014 01:38:47 PM EST

Google is not the only one at the party. TypeScript (, which is also opensource, appears to do the same thing. Few people know that Microsoft has added support for compiling TypeScript into Visual Studio 2013.

United StatesBrain2000

01/20/2014 09:00:08 PM EST

@DigDug2K Pretty strange... Dart is faster than JavaScript and this is the reference: Please, can you share your benchmarks?

CanadaClaude Coulombe

01/20/2014 09:13:03 PM EST

Sounds like C# only less well thought out. Also, the business about Dartium certainly sounds like a bad idea unless you are OK with Google owning the whole chain from server to browser.

United StatesMorris

01/25/2014 11:01:27 AM EST

Dart is an excellent language with great tools and very good performance...currently my team and I are working on WebGL gaming with Dart and so far things are progressing nicely, we couldn't imagine doing what we're doing with javascript or typescript etc right now.

United Statessulfide

Google provides add-ons for Google Docs
Developers can create their own add-ons according to certain guidelines Read More...

News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>



Download Current Issue

Need Back Issues?

Want to subscribe?