Red Hat and Google have announced version 1.0’s of their long baking new languages, Ceylon 1.0.0 and Dart SDK 1.0. With three years of work on Ceylon and at least two years behind Dart, are they worth looking at?
Red Hat’s Ceylon comes from Gavin King’s team at the company who’ve been working for around three years on a language which initially targeted the Java virtual machine but now also can generate JavaScript. Created as a Java (the language) replacement, it features the a fairly familiar curly brace syntax, adds in declarative syntax for tree structures, removes primitive types as part of a new powerful static type system and mixes in mixin inheritance.
But thats just scratching the surface - the documentation’s introduction gives a better feel for the extensive re-envisioning of a large systems language. There’s also a tour to get some hands on experience and an Eclipse-based IDE for Ceylon already. The language and tools are all Apache 2.0 Licensed and source is up on GitHub. The JVM is a hotbed for new languages and Ceylon adds to the mix with what feels like a pragmatic approach.
Meanwhile, Google’s Dart 1.0 doesn’t go near the JVM; it’s designed for browsers and specifically as an alternative to JavaScript. Although Dart can translate to JavaScript that is predominantly so Dart code can be run in current browsers. Google’s long game is to see a Dart virtual machine in every browser and get higher performance browser code. The language on first look feels like a more formal JavaScript, but with a push on readability, structure and expressiveness. On second look, it feels more like Java, with annotations, an import system, Its libraries bring along support for streams, lazy iterables, futures, a cleaner DOM API and more. There’s plenty to look at and this presentation from Google I/O covers more of the language.
CoffeeScript, TypeScript and other browser-centric languages work more in harmony with JavaScript and don’t set out to replace it entirely, but thats what Dart has set out to do and that may be its biggest problem - the big performance benefits of Dart come with most browsers having the Dart virtual machine, but with only Google onboard, that isn’t going to happen. The JavaScript tool chain has some neat tricks though like tree-shaking (reducing library dependency) and minifying.
Will it gain traction? There’s a whole web of JavaScript that’s a standing bet against it and personally I find it somewhat hard to get excited by the language itself; Brendan Eich’s ten day hack that is JavaScript is still impressive, if rich in dark corners and sharp edges, but it does have cross-vendor support and standards backing it up. But if the development of JavaScript as a language and a standard stumbles again as it has in the past, Dart may have a window. The tipping point to look for is when another major browser maker adopts it. Dart is also open source (BSD licence) and source code is available on its Google Code project.
What Ceylon and Dart do have in common is their version 1.0’s are richly tooled and documented. That should, in itself, be a model for anyone wanting to bring a new language to the world. Anyone wanting to look at either language is not going to have difficulty getting started.
This article was imported from the original CodeScaling blog