Ceylon 1.2.0 is now available

After a full year in development, and with more than 1500 issues closed, Ceylon 1.2.0 brings new language features, including:

  • named constructors,
  • serialization,
  • native declarations,
  • improved flow-sensitive typing,
  • destructuring for tuples and entries
  • let, switch, if, and object expressions, and
  • more powerful annotation constraints.

Furthermore, the typechecker and JavaScript backend now support type functions as an experimental feature.

Also part of this release are enhancements to the tooling, such as:

  • a new debugger for Ceylon, and
  • the Java EE packaging command, ceylon war.

As always, this release incorporates hundreds of other bugfixes and enhancements.

About Ceylon

Ceylon is a modern, modular, statically typed programming language for the Java and JavaScript virtual machines. The language features a flexible and very readable syntax, a unique and uncommonly elegant static type system, a powerful module architecture, and excellent tooling, including an awesome Eclipse-based IDE.

Ceylon enables the development of cross-platform modules that execute portably in both virtual machine environments. Alternatively, a Ceylon module may target one or the other platform, in which case it may interoperate with native code written for that platform.

In the box

This release includes:

  • a complete language specification that defines the syntax and semantics of Ceylon in language accessible to the professional developer,
  • a command line toolset including compilers for Java and JavaScript, a documentation compiler, a test runner, a WAR archive packager, and support for executing modular programs on the JVM and Node.js,
  • a powerful module architecture for code organization, dependency management, and module isolation at runtime,
  • the language module, our minimal, cross-platform foundation of the Ceylon SDK, and
  • a full-featured Eclipse-based integrated development environment.


Ceylon is a highly understandable object-oriented language with static typing. The language features:

  • an emphasis upon readability and a strong bias toward omission or elimination of potentially-harmful or potentially-ambiguous constructs and toward highly disciplined use of static types,
  • an extremely powerful and uncommonly elegant type system combining subtype and parametric polymorphism with:
    • first-class union and intersection types,
    • both declaration-site and use-site variance, and
    • the use of principal types for local type inference and flow-sensitive typing,
  • a unique treatment of function and tuple types, enabling powerful abstractions, along with the most elegant approach to null of any modern language,
  • first-class constructs for defining modules and dependencies between modules,
  • a very flexible syntax including comprehensions and support for expressing tree-like structures,
  • fully-reified generic types, on both the JVM and JavaScript virtual machines, and a unique typesafe metamodel.

More information about these language features may be found in the feature list and quick introduction.

This release introduces the following new language features and improvements:

  • named constructors,
  • support for serialization libraries in the metamodel,
  • the native annotation, which allows the use of platform-dependent code in cross-platform modules
  • improvements to flow-sensitive typing,
  • destructuring for tuples and entries,
  • let, switch, and if expressions,
  • inline object expressions,
  • more powerful annotation constraints,
  • type argument inference for function references,
  • an improved algorithm for type argument inference in invocation expressions,
  • improvements to analysis of disjointness for sequence types,
  • new type abbreviations, T[N] and T(*A),
  • an abbreviated syntax for identifying the containing `package`, `module`, `class`, or `interface`,
  • inline variable defininition in switch
  • the ability to directly import members of a singleton object,
  • relaxation of type constraint checking where unnecessary to ensure soundness, and
  • experimental support for type functions (higher-order generics) and references to generic functions (higher-rank polymorphism).

Language module

For Ceylon 1.2, the following new APIs were introduced to the language module:

  • the map() and set() functions allow creation of immutable Maps and Sets with no dependency to ceylon.collection,
  • distinct, frequences(), group(), tabulate(), and summarize() were added to Iterable,
  • getOrDefault(), defaultNullItems(), and coalescedMap were added to Map,
  • Collection.permutations() was added,
  • formatFloat() was added,
  • the Contextual interface was added, a cross-platform abstraction of thread-local values,
  • some operations of List were split out onto the new SearchableList interface, and
  • arrayOfSize() was deperecated and replaced with the constructor Array.ofSize().

Furthermore, some native implementation code has been rewritten in Ceylon using native.

Compiler and command line tools

Enhancements to the Java compiler include:

  • much improved interoperation with Maven, including support for overriding module metadata with overrides.xml, and --flat-classpath and --auto-export-maven-dependencies,
  • all compiled classes are now Serializable and have default constructors, allowing much smoother interoperation with certain Java frameworks,
  • improved interoperation with Java annotations, and
  • basic support for interoperation with libraries written in Scala.

The JavaScript compiler now supports type functions, allowing the use of higher-order and higher-rank polymorphism in Ceylon. These experimental features are not yet supported by the Java compiler.

There are several new features and improvements to the command line toolset:

  • the ceylon war command repackages a module as a Java EE WAR archive,
  • the ceylon browse command opens module documentation in the browser,
  • multiple commands can be given simultaneously, for example ceylon compile,doc,run com.redhat.hello,
  • ceylon help command and ceylon --help now page output by default, and
  • the ceylon command architecture now supports writing plugins in Ceylon.


Ceylon IDE now features the following improvements, along with many bugfixes and a number of performance enhancements:

  • a brand new debugger for Ceylon,
  • extensive support for new language features including constructors and native,
  • improvements to the powerful Change Parameter List refactoring,
  • the Inline refactoring can now inline a type alias,
  • filtering of packages from searches and completions,
  • many new quick fixes and assists,
  • Paste Java as Ceylon,
  • the popup Outline can now show inherited members,
  • the redesigned Open Declaration dialog now shows documentation,
  • keyboard shortcuts were added for certain quick assists,
  • support for Eclipse's new dark theme,
  • refactored preferences pages, with much greater customizability, including
  • two new alternative syntax highlighting themes, along with an alternative icon set.

A number of important subsystems have been abstracted and rewritten in Ceylon, to support the ongoing development of the new IntelliJ-based IDE for Ceylon.


The platform modules, recompiled for 1.2.0, are available in the shared community repository, Ceylon Herd.

This release introduces two new platform modules:

  • ceylon.transaction provides support for distributed transaction processing, and
  • ceylon.regex provides regular expressions.

Along with several API enhancements and bugfixes, including:

  • ceylon.time now has functions for parsing ISO 8601 formatted dates, times, and datetimes,
  • ceylon.locale now supports formatting zoned times, and parsing dates and times,
  • ceylon.interop.java now has javaClassFromDeclaration(),
  • ceylon.net now has redirect(), and its Uri is now immutable, and
  • the collection types in ceylon.collection now offer additional named constructors.

OpenShift cartridge

The Ceylon cartridge for OpenShift has been improved and updated to support Ceylon 1.2.


You can try Ceylon using the redesigned Web IDE, now rewritten in Ceylon, and featuring syntax highlighting, interactive error reporting, autocompletion, online documentation, and persistence and code sharing via Gist.

The Web IDE serves a dual purpose as a standard example demonstrating the use of Ceylon for web application development and deployment to the OpenShift cloud platform.


The Ceylon community site, http://ceylon-lang.org, includes documentation, and information about getting involved.

Source code

The source code for Ceylon, its specification, and its website, is freely available from GitHub.

Information about Ceylon's open source licenses is available here.


Bugs and suggestions may be reported in GitHub's issue tracker.

Migrating from Ceylon 1.1

Migration from Ceylon 1.1 is easy. To recompile a module for 1.2:

  • First ensure that its dependencies have also been recompiled.
  • If it imports a Ceylon SDK platform module, upgrade the version number specified by the module import statement from "1.1.0" to "1.2.0" .
  • If it imports any platform-native module, annotate its module declaration native("jvm") or native("js"), depending upon the target platform. This step does not apply to cross-platform modules.
  • If, when recompiling, you encounter errors on assert statements, try removing the assertion (the improvements to flow typing now make some type assertions redundant).


As always, we're deeply grateful to the community volunteers who contributed a substantial part of the current Ceylon codebase, working in their own spare time. The following people have contributed to Ceylon:

Gavin King, Stéphane Épardaud, Tako Schotanus, Tom Bentley, David Festal, Enrique Zamudio, Bastien Jansen, Emmanuel Bernard, Aleš Justin, Tomáš Hradec, James Cobb, Ross Tate, Max Rydahl Andersen, Mladen Turk, Lucas Werkmeister, Roland Tepp, Diego Coronel, Matej Lazar, John Vasileff, Toby Crawley, Julien Viet, Loic Rouchon, Stephane Gallès, Ivo Kasiuk, Corbin Uselton, Paco Soberón, Michael Musgrove, Daniel Rochetti, Henning Burdack, Luke deGruchy, Rohit Mohan, Griffin DeJohn, Casey Dahlin, Alexander Altman, Alexander Zolotko, Alex Szczuczko, Andrés G. Aragoneses, Anh Nhan Nguyen, Brice Dutheil, Carlos Augusto Mar, Charles Gould, Chris Gregory, klinger, Martin Voelkle, Mr. Arkansas, Paŭlo Ebermann, Vorlent, Akber Choudhry, Renato Athaydes, Flavio Oliveri, Michael Brackx, Brent Douglas, Lukas Eder, Markus Rydh, Julien Ponge, Pete Muir, Nicolas Leroux, Brett Cannon, Geoffrey De Smet, Guillaume Lours, Gunnar Morling, Jeff Parsons, Jesse Sightler, Oleg Kulikov, Raimund Klein, Sergej Koščejev, Chris Marshall, Simon Thum, Maia Kozheva, Shelby, Aslak Knutsen, Fabien Meurisse, Sjur Bakka, Xavier Coulon, Ari Kast, Dan Allen, Deniz Türkoglu, F. Meurisse, Jean-Charles Roger, Johannes Lehmann, allentc, Nikolay Tsankov, Chris Horne, Gabriel Mirea, Georg Ragaller, Harald Wellmann, klinger, Oliver Gondža, Stephen Crawley.