Dart's not dead! Google retools JavaScript challenger

The Dart project may not be displacing JavaScript entirely, but Google's still spiffing it up and promoting it to web developers

Dart's not dead! Google retools JavaScript challenger
Credit: Pixabay

Google's Dart language hasn't become the JavaScript killer it was intended to be. That said, Google still uses it a great deal internally for web-app-related projects, such as AdSense.

Now, Google is planning improvements to the language's ecosystem in order to make a renewed pitch for Dart as a language for mobile app development.

A post at the official Dart language blog described a number of improvements in the works for the language, all based on keeping what existing developers have said they like about Dart, although it's unclear whether the lion's share of that feedback comes from Google developers or third parties using Dart.

Dart provides static analysis for programs, but Google plans to bolster it by adding "strong mode," which ensures programs that violate Dart's type system will not compile, similar to JavaScript's use strict directive. Dart's compiler will also render to JavaScript faster.

Another plan in the works is to provide Dart with generic methods to allow functions to behave differently depending on what variable types they receive as arguments.

Hints have been surfacing for some time that Google wants developers to think of Dart specifically for web development, rather than as a generic replacement for JavaScript wherever it might appear. Earlier this year, Dart received its own implementation of the Angular 2 front-end framework. Angular is nominally written in Microsoft's TypeScript dialect of JavaScript, but its Dart implementation -- called, appropriately enough, AngularDart -- is now maintained separately as a project specifically in Dart, not a conversion of the original project to Dart.

Dart is positioned in contrast with JavaScript to provide a somewhat more comprehensive standard library. JavaScript's standard library is minimal by design, but the ecosystem developed to support it has been criticized for being fragile and difficult to maintain. Dart's plan is to continue providing what Google describes as "batteries included," with core libraries that are "tight, efficient, and comprehensive."

That said, Google is aware that Dart can't live without the rest of the JavaScript world. One of the other initiatives in the work for Dart is a greater degree of interoperation with existing JavaScript libraries -- for example, converting TypeScript .d.ts declarations (which reference code written elsewhere) into Dart libraries, so the latter can be used with the former.

To comment on this article and other InfoWorld content, visit InfoWorld's LinkedIn page, Facebook page and Twitter stream.
From CIO: 8 Free Online Courses to Grow Your Tech Skills
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.