It is official; Google is developing a programming language. Lars Bak, a Google project manager, at the Goto Conference in Denmark, detailed the news of the new Google programming language. The new language, called Dart, is designed to be used for all sorts of projects ranging from small simple projects to massive collaborative projects like Gmail.
Programmer and project leader Lars Bak detailed the project in a talk today at the Goto conference in Denmark and in a blog post. Dart is geared for everything from small, unstructured projects to large, complicated efforts–Gmail and Google Docs, for example.
“If we want to focus on making the Web better over time, we have to innovate,” including with new programming languages, Bak said in an interview.
The unveiling of the Dart programming language also included a site that provides developers tools, code samples, and tutorials for programming with the language. The website also features a discussion forum, libraries of supporting software, and the language specifications. When an internal Google memo leaked in 2010 with details about the Dart programming language – called Dash at the time – one of the notes from the memo was that the language was designed to replace Javascript as the preeminent programming language of the web.
Of course, this does not even mean that everyone at Google is adopting the new language. Numerous individuals within the company remain strong proponents of Javascript and even Bak is not claiming the impending demise of Javascript. While he remains incredibly ambitious about the future of Dart, he said, “It’s not going to replace JavaScript. JavaScript is a cornerstone of the Web today, and it will continue to be for a long, long time.”
He was not receptive, however, to complaints by many about the fact that the language was developed completely in-house at Google, and not with an open and collaborative approach. He said, “I don’t buy the argument that before writing any line of code or designing any features, you put it in a standards committee, because that would just be a lot of screaming. You have to have coherent design before you start adopting Dart as a standard.” This closed, in-house approach is a large departure from Google’s past support of open collaboration and is more akin to the Apple approach to tech; a business model that Google has ridiculed on numerous occasions.
Google does want to make Dart a standard though. They have moved Dart forward to the next phase of its maturation, which includes getting outside feedback and active participation from potential partners and developers. On moving to the next phase of development Bak Said, “We hope the other browser vendors will be excited.” It remains to be seen how quickly others will adopt Dart.
Creating and introducing new programming languages is difficult. Many industry experts have tried to encourage the development and adoption of new, more advanced programming languages. Many of the programming languages that are widely used were created decades ago when computing was in its infancy, and they lack features that can easily take advantage of modern hardware and computing architecture. One of the biggest obstacles to reforming and replacing existing programming languages is the fact that millions of people use the languages and have extensive supporting libraries and knowledgebases. With that said, some new programming languages have been introduced in the past 20 years that have seen wide adoption including Java, Javascript, and C#. In addition to Dart, Google is trying to encourage the adoption for the Go programming language, which is designed to be used for native software applications that would generally be written with either C or C++ today, which are not known for their ease of use. Google has created Dart to address a variety of shortcomings present in today’s web programming languages. According to Dart’s technical overview, some of the problems it intends to address include:
1. Unwieldy code growth. It is not uncommon for small scripts to develop and grow into massive web applications with huge amounts of code. These gigantic apps are incredibly unwieldy and difficult to maintain and debug, and because they are monolithic structures in nature, it is nearly impossible to break up the code into different parts. This prevents teams of programmers to work on different pieces of the program independently.
2. Choosing Static or Dynamic. With the existing programming languages, programmers are forced to choose between using a static language or a dynamic language. Current static languages necessitate an inflexible style of coding that can feel constraining and difficult to work with in addition to requiring large, complex toolchains.
3. Lack of Client/Server Homogeny. With few exceptions – Node.js and the Google Web Toolkit for example – developers have failed to build systems that encompass both client and server operations under one umbrella.
4. Cumbersome Context Switches. The different formats and languages require content switches that made coding more complex and time consuming.
5. Heavy Comment Usage. Scripting languages are popular because they are lightweight languages that are easy to learn and allow programmers to develop applications quickly. One drawback is that they rely heavily on comments to detail how each part of the application works with the other parts. This can make it difficult for other programmers beside the author to read, understand, and maintain the code.
One potential advantage that Google has with the Dart language is that they will be able to integrate it directly into their Chrome browser, which recently overtook Mozilla Firefox as the number 2 browser behind Internet Explorer. This integration is something that Bak and the rest of the Dart team is extremely excited about because it will enable “snapshotting.” Snapshotting greatly reduces a web apps startup time, and speed and efficiency are one of the hallmarks of the Chrome browser and operating system. Snapshotting makes this possible by taking the web application and serializing it into a single data block.
To demonstrate the potential of snapshotting to improve performance, Google loaded a 55,000-line Dart program in 60 milliseconds with snapshotting. Without snapshotting, the same 55,000-line program loaded in 640 milliseconds. A traditional Javascript program would have comparable load times to a Dart program without snapshotting. He said, “I can see a lot of optimizations that’ll be applicable to Dart when it’s integrated directly into a browser.”
Bak also elaborated on Google’s design goals for Dart:
1. Create an easy and familiar language for quick learning and adoption by programmers.
2. Deliver great performance on all modern web browsers and computing environments from server-side execution to handheld devices.
3. Create a structured and flexible web programming language.
Bak envisions Dart being used in a wide range of different development scenarios. The goal is to have Dart as viable for a small one-person project with very little architecture as a large-scale enterprise projects using teams of programmers needing format types in the code. In order to support such wide variety of projects, Dart includes optional types allowing people to code without types and add them further down the road as needed.
Dart programs will be able to run in a variety of ways. The fact that Dart programs will be able to run using a compiler that translates Dart code into Javascript will be huge boon to its viability allowing it to run on browsers that do not support Dart. Dart will also run within its own virtual machine.
Google has used its Chrome browser as a vehicle to roll out other technology products such as WebM and SPDY, and the 2010 Dart/Dash memo discussed Google’s plans to integrate Dart into the Chrome browser. On this topic, however, Bak was hesitant to make any definitive affirmative statements beyond mentioning that full integration would have a whole host of benefits. With that said, Bak is intimately familiar with working with the Chrome team and the challenges involved with improve web app performance; he was the lead developer of Chrome’s V8 Javascript engine.
One of the biggest benefits for getting Dart integration into the Chrome browser would be the fact that it would allow Google to build more advanced versions of its Web Apps suite than is currently possible. Google is betting big on cloud computing and its Google Apps platform, and if Dart lives up to its stated design goals, the improved performance could further increase the adoption of its browser and web apps. “Google has a lot fairly big Web applications. That includes Gmail and Docs. I hope many of these apps will be converted into Dart,” Bak said. He went on to say that this is merely his opinion and there are currently no explicit plans to convert these web apps into Dart programs.
“At this point it is mostly the language we are focused on,” he said. “We hope to get positive feedback on the language.”
