Google Launches Dart Programming Language

The JavaScript alternative is better suited for creating large Web applications, say Google engineers.

Thomas Claburn, Editor at Large, Enterprise Mobility

October 10, 2011

3 Min Read
InformationWeek logo in a gray background | InformationWeek

Office 365 Vs. Google Apps: Top 10 Enterprise Concerns

Office 365 Vs. Google Apps: Top 10 Enterprise Concerns


Office 365 Vs. Google Apps: Top 10 Enterprise Concerns (click image for larger view and forslideshow)

Google on Monday introduced a preview version of Dart, its new programming language for Web applications. The introduction was widely expected, not only because the announcement was listed on the GOTO developer conference schedule, but because a Google engineer described the language and its reason for being in a message sent to a developer mailing list late last year.

"The goal of the Dash [Dart's former name] effort is ultimately to replace JavaScript as the lingua franca of Web development on the open Web platform," said Google engineer Mark S. Miller in his post last year.

Lars Bak, a Google engineer who helped develop Chrome's V8 JavaScript engine and one of the creators of Dart, said in a phone interview that Google works regularly on large Web applications and that the company's engineers feel they need a new programming language to describe large, complex Web applications.

Whereas Miller described Dart as an eventual replacement for JavaScript, Bak offered a more diplomatic assessment. "Program languages have a lot to do with taste," he said. "There will always be people who prefer JavaScript."

But Dart offers several advantages. It allows programmers to write "untyped" code--where data types aren't specified as a string or number, for example--that can be turned into "typed" code later. Writing untyped code is generally faster at the outset and, at later stages of development, having "typed" data in a program aids with debugging and makes code more structured. This is particularly beneficial when developing largescale applications.

[Google recently introduced a database service called Cloud SQL. Find out more.]

Bak also says that Dart should perform better than JavaScript in certain situations. JavaScript, he said, has an Achilles' heel in that it can slow down the launch of an application. This is particularly noticeable on mobile devices, where code has to be loaded over what may be a relatively slow network connection.

"In Dart, we have a way to bundle the app into faster form called 'snapshotting,'" he said, noting that Dart apps prepared this way load about 10 times faster than conventional JavaScript code. "Over time, we think we can make Dart run faster than Javascript."

Dart also offers a structured way to use code libraries that isn't available in JavaScript. In JavaScript, he said, it's possible that a library can be altered while the app is running, leading to unpredictable results or errors. That's not possible in Dart, he said.

"If you develop two independent components using same library, they can use that library without the other component destroying the library," he said.

Dart code can be run either by compiling it into JavaScript or using a virtual machine. Bak says Google is considering how to build the Dart virtual machine into Chrome and hopes that other browser makers will choose to do so as well.

Google has made Dart available as an open source project at dartlang.org.

About the Author

Thomas Claburn

Editor at Large, Enterprise Mobility

Thomas Claburn has been writing about business and technology since 1996, for publications such as New Architect, PC Computing, InformationWeek, Salon, Wired, and Ziff Davis Smart Business. Before that, he worked in film and television, having earned a not particularly useful master's degree in film production. He wrote the original treatment for 3DO's Killing Time, a short story that appeared in On Spec, and the screenplay for an independent film called The Hanged Man, which he would later direct. He's the author of a science fiction novel, Reflecting Fires, and a sadly neglected blog, Lot 49. His iPhone game, Blocfall, is available through the iTunes App Store. His wife is a talented jazz singer; he does not sing, which is for the best.

Never Miss a Beat: Get a snapshot of the issues affecting the IT industry straight to your inbox.

You May Also Like


More Insights