*** Welcome to piglix ***

Ceylon (programming language)

Ceylon
Ceylon (programming language) logo.png
Paradigm Object-oriented
Designed by Gavin King, Red Hat
First appeared 2011
Stable release
1.3.0 / September 19, 2016; 3 months ago (2016-09-19)
Typing discipline Static, strong, safe
License Apache v2
Filename extensions .ceylon
Website ceylon-lang.org
Influenced by
Java,Scala, Smalltalk, ML,Lisp

Ceylon is an object-oriented, strongly statically typed programming language with an emphasis on immutability, created by Red Hat. Ceylon programs run on the Java Virtual Machine, and can be compiled to JavaScript. The language design focuses on readability, predictability, toolability, modularity, and metaprogrammability.

Important features of Ceylon include:

The name "Ceylon" is an oblique reference to Java, in that Java and Sri Lanka, formerly known as Ceylon, are islands known for growth and export of coffee and tea.

Ceylon is heavily-influenced by Java's syntax, but adds many new features.

One of the most novel aspects of Ceylon is its type system. Ceylon foregoes Java's primitive types and boxing in favor of a type system composed entirely of first-class objects. While this may cause boxing overhead in certain situations, it makes the type system more uniform.

Ceylon allows for union and intersection types, in a similar fashion to TypeScript, Whiley and Flow.

Union types, written A|B, allow a variable to have more than one type. The following example shows a Ceylon function which may take either an integer or a string:


...
Wikipedia

...