Ceylon (programming language)
Ceylon was 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 (JVM), and could be compiled to JavaScript. The language design focuses on source code readability, predictability, toolability, modularity, and metaprogrammability. Important features of Ceylon include: * A type system enforcing null safety and list element existence at compile time * Regular syntax and semantics, avoiding special cases and primitively defined constructs in favor of syntactic sugar * Support for generic programming and metaprogramming, with reified generics * Modularity built into the language, based on JBoss modules, interoperable with OSGi and Maven * powerful tools, including an Eclipse-based IDE 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. In August 2017, Ceylon was donated to the Eclipse Foundation. Development slowed down and finally stopped in 2020. In April 2023, Eclipse Foundation declared the termination of the transition.
Ceylon was 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 (JVM), and could be compiled to JavaScript. The language design focuses on source code readability, predictability, toolability, modularity, and metaprogrammability. Important features of Ceylon include: A type system enforcing null safety and list element existence at compile time Regular syntax and semantics, avoiding special cases and primitively defined constructs in favor of syntactic sugar Support for generic programming and metaprogramming, with reified generics Modularity built into the language, based on JBoss modules, interoperable with OSGi and Maven powerful tools, including an Eclipse-based IDE 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. In August 2017, Ceylon was donated to the Eclipse Foundation. Development slowed down and finally stopped in 2020. In April 2023, Eclipse Foundation declared the termination of the transition. shared void integerOrString(Integer|String input) { if (is Integer input) { print("Got the integer ``input``"); } else { print("Got the string '``input``'"); } } Intersection types, written A&B , are the theoretical foundation of flow-sensitive typing: shared void integerOrString(Integer|String input) { Integer added = input + 6; // illegal; the + operator is not defined on Integer|String if (is Integer input) { Integer added = input + 6; // legal; input is now known to be an Integer print("Got the integer ``input``"); } else { print("Got the string '``input``'"); } } The condition is Integer input narrows the type of input to <Integer|String> & Integer , which distributes to Integer&Integer | String&Integer , which, as String and Integer are disjoint types, is equivalent to Integer&Integer | Nothing ( Nothing is the empty bottom type), which simplifies to just Integer . Iterable removeNulls (Iterable stream); When removeNulls is called with a stream of Integer|Null elements, the result will be a stream of <Integer|Null> & Object elements, which simplifies to Integer . // A top-level higher-order function using block syntax (not associated with any user-created classes) String process(String text, String transformString(String toChange)) { return transformString(text); } // A top-level function calling String.reverse in expression form. String reverse(String text) => text.reversed; // A function reference to String.reversed but mostly equivalent to the function above. String(String) reverseFunctionReference = String.reversed; // An example where the top-level function above is provided as an argument to the higher-order function above String reversed1 = process("one", reverse); // An example where an anonymous function - (text) => text+text - is provided to the higher-order function above. String reversed2 = process("one", (text) => text+text); // Traditional syntax for enumerated type, in this case, limiting the instances to three objects(for this purpose: Singletons) abstract class Vehicle(shared String name) of plane | train | automobile {} object plane extends Vehicle("plane") {} object train extends Vehicle("train") {} object automobile extends Vehicle("automobile") {} // Compile error: type is not a subtype of any case of enumerated supertype: 'boat' inherits 'Vehicle' //object boat extends Vehicle("boat") {} // New (as of Ceylon 1.2.0) constructor-based syntax class Vehicle of plane | train | automobile { String name; abstract new named(String pName) { name = pName; } shared new plane extends named("plane") {} shared new train extends named("train") {} shared new automobile extends named("automobile") {} // Compile error: value constructor does not occur in of clause of non-abstract enumerated class: 'boat' is not listed in the of clause of 'Vehicle' //shared new boat extends named("boat") {} } Integer i = 3; value i = 3; Integer add(Integer i1, Integer i2) { return i1 + i2; } function add(Integer i1, Integer i2) { return i1 + i2; } However, to make single-pass type inference possible, type inference is only allowed for non-toplevel and unshared declarations. === Entry point with names=== By default the starter ( ceylon run ) runs the shared run() function of a module: /* The classic Hello World program */ shared void run() { print("Hello, World!"); } but any other shared function without parameters can be used as main calling the program with the run parameter, like this: ceylon run --compile=force --run hello default
References
- The Ceylon Language: §4.1 Compilation unit structure · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "The Ceylon Language: §4.1 Compilation unit structure." King, Gavin. 2015-12-03. http://ceylon-lang.org/documentation/1.2/spec/html_single/#compilationunitstructure. Accessed 24 November 2026.
Chicago "The Ceylon Language: §4.1 Compilation unit structure." King, Gavin. 2015-12-03. http://ceylon-lang.org/documentation/1.2/spec/html_single/#compilationunitstructure.
APA King, Gavin. (2015). The Ceylon Language: §4.1 Compilation unit structure. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/1.2/spec/html_single/#compilationunitstructure
- Write in Ceylon, deploy as OSGI, use in Java EE · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "Write in Ceylon, deploy as OSGI, use in Java EE." Festal, David (2014-10-10). 2015-12-03. http://ceylon-lang.org/blog/2014/10/10/ceylon-osgi-jee/. Accessed 24 November 2026.
Chicago "Write in Ceylon, deploy as OSGI, use in Java EE." Festal, David (2014-10-10). 2015-12-03. http://ceylon-lang.org/blog/2014/10/10/ceylon-osgi-jee/.
APA Festal, David (2014-10-10). (2015). Write in Ceylon, deploy as OSGI, use in Java EE. Retrieved November 24, 2026, from http://ceylon-lang.org/blog/2014/10/10/ceylon-osgi-jee/
- Maven repositories · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "Maven repositories." 2015-12-03. http://ceylon-lang.org/documentation/1.2/reference/repository/maven/#maven_repositories. Accessed 24 November 2026.
Chicago "Maven repositories." 2015-12-03. http://ceylon-lang.org/documentation/1.2/reference/repository/maven/#maven_repositories.
APA encyclopegia.org. (2015). Maven repositories. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/1.2/reference/repository/maven/#maven_repositories
- Features of Ceylon IDE · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "Features of Ceylon IDE." 2015-12-03. http://ceylon-lang.org/documentation/1.2/ide/features/. Accessed 24 November 2026.
Chicago "Features of Ceylon IDE." 2015-12-03. http://ceylon-lang.org/documentation/1.2/ide/features/.
APA encyclopegia.org. (2015). Features of Ceylon IDE. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/1.2/ide/features/
- ceylon / ceylon · retrieved 2024-01-21 · rev 1369099973
Cite this reference
MLA "ceylon / ceylon." 2024-01-21. https://github.com/eclipse-archived/ceylon. Accessed 24 November 2026.
Chicago "ceylon / ceylon." 2024-01-21. https://github.com/eclipse-archived/ceylon.
APA encyclopegia.org. (2024). ceylon / ceylon. Retrieved November 24, 2026, from https://github.com/eclipse-archived/ceylon
- Eclipse Ceylon™ Termination Review · retrieved 2023-04-22 · rev 1369099973
Cite this reference
MLA "Eclipse Ceylon™ Termination Review." 2023-04-22. https://projects.eclipse.org/projects/technology.ceylon/reviews/termination-review. Accessed 24 November 2026.
Chicago "Eclipse Ceylon™ Termination Review." 2023-04-22. https://projects.eclipse.org/projects/technology.ceylon/reviews/termination-review.
APA encyclopegia.org. (2023). Eclipse Ceylon™ Termination Review. Retrieved November 24, 2026, from https://projects.eclipse.org/projects/technology.ceylon/reviews/termination-review
- Ceylon: Language Design FAQ · retrieved 2026-11-17 · rev 1369099973
Cite this reference
MLA "Ceylon: Language Design FAQ." King, Gavin. 2026-11-17. http://ceylon-lang.org/documentation/faq/language-design/. Accessed 24 November 2026.
Chicago "Ceylon: Language Design FAQ." King, Gavin. 2026-11-17. http://ceylon-lang.org/documentation/faq/language-design/.
APA King, Gavin. (2026). Ceylon: Language Design FAQ. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/faq/language-design/
- The Ceylon Language: §1.4.3 Compile-time safety for null values and flow-sensitive typing · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "The Ceylon Language: §1.4.3 Compile-time safety for null values and flow-sensitive typing." King, Gavin. 2015-12-03. http://ceylon-lang.org/documentation/1.2/spec/html_single/#compiletimesafety. Accessed 24 November 2026.
Chicago "The Ceylon Language: §1.4.3 Compile-time safety for null values and flow-sensitive typing." King, Gavin. 2015-12-03. http://ceylon-lang.org/documentation/1.2/spec/html_single/#compiletimesafety.
APA King, Gavin. (2015). The Ceylon Language: §1.4.3 Compile-time safety for null values and flow-sensitive typing. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/1.2/spec/html_single/#compiletimesafety
- The Ceylon Language: 4.7 Functions · retrieved 2026-11-17 · rev 1369099973
Cite this reference
MLA "The Ceylon Language: 4.7 Functions." King, Gavin. 2026-11-17. http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#functions. Accessed 24 November 2026.
Chicago "The Ceylon Language: 4.7 Functions." King, Gavin. 2026-11-17. http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#functions.
APA King, Gavin. (2026). The Ceylon Language: 4.7 Functions. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#functions
- The Ceylon Language: 4.5.8 Enumerated classes · retrieved 2026-11-17 · rev 1369099973
Cite this reference
MLA "The Ceylon Language: 4.5.8 Enumerated classes." King, Gavin. 2026-11-17. http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#classeswithcases. Accessed 24 November 2026.
Chicago "The Ceylon Language: 4.5.8 Enumerated classes." King, Gavin. 2026-11-17. http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#classeswithcases.
APA King, Gavin. (2026). The Ceylon Language: 4.5.8 Enumerated classes. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#classeswithcases
- The Ceylon Language: §3.2.9 Type inference · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "The Ceylon Language: §3.2.9 Type inference." King, Gavin. 2015-12-03. http://ceylon-lang.org/documentation/1.2/spec/html_single/#typeinference. Accessed 24 November 2026.
Chicago "The Ceylon Language: §3.2.9 Type inference." King, Gavin. 2015-12-03. http://ceylon-lang.org/documentation/1.2/spec/html_single/#typeinference.
APA King, Gavin. (2015). The Ceylon Language: §3.2.9 Type inference. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/1.2/spec/html_single/#typeinference
- Frequently Asked Questions: What is Ceylon? · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "Frequently Asked Questions: What is Ceylon?." 2015-12-03. http://ceylon-lang.org/documentation/1.2/faq/#what_is_ceylon. Accessed 24 November 2026.
Chicago "Frequently Asked Questions: What is Ceylon?." 2015-12-03. http://ceylon-lang.org/documentation/1.2/faq/#what_is_ceylon.
APA encyclopegia.org. (2015). Frequently Asked Questions: What is Ceylon?. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/1.2/faq/#what_is_ceylon
- https://ceylon-lang.org/download-archive/ Ceylon: Download Previous Ceylon versions Wikipedia revision 1369099973, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1369099973
Cite this reference
MLA "https://ceylon-lang.org/download-archive/ Ceylon: Download Previous Ceylon versions Wikipedia revision 1369099973, retrieved 2026-11-18." https://ceylon-lang. 2026-11-17. https://ceylon-lang.org/download-archive/. Accessed 24 November 2026.
Chicago "https://ceylon-lang.org/download-archive/ Ceylon: Download Previous Ceylon versions Wikipedia revision 1369099973, retrieved 2026-11-18." https://ceylon-lang. 2026-11-17. https://ceylon-lang.org/download-archive/.
APA https://ceylon-lang. (2026). https://ceylon-lang.org/download-archive/ Ceylon: Download Previous Ceylon versions Wikipedia revision 1369099973, retrieved 2026-11-18. Retrieved November 24, 2026, from https://ceylon-lang.org/download-archive/
- Ceylon: Licenses · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "Ceylon: Licenses." 2015-12-03. http://ceylon-lang.org/code/licenses. Accessed 24 November 2026.
Chicago "Ceylon: Licenses." 2015-12-03. http://ceylon-lang.org/code/licenses.
APA encyclopegia.org. (2015). Ceylon: Licenses. Retrieved November 24, 2026, from http://ceylon-lang.org/code/licenses
- ceylon/user - Gitter · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "ceylon/user - Gitter." 2015-12-03. https://gitter.im/ceylon/user?at=5660a7242cbea1d7054de9d9. Accessed 24 November 2026.
Chicago "ceylon/user - Gitter." 2015-12-03. https://gitter.im/ceylon/user?at=5660a7242cbea1d7054de9d9.
APA encyclopegia.org. (2015). ceylon/user - Gitter. Retrieved November 24, 2026, from https://gitter.im/ceylon/user?at=5660a7242cbea1d7054de9d9
- ceylon/user - Gitter · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "ceylon/user - Gitter." 2015-12-03. https://gitter.im/ceylon/user?at=5660a90e5057376520db6f8b. Accessed 24 November 2026.
Chicago "ceylon/user - Gitter." 2015-12-03. https://gitter.im/ceylon/user?at=5660a90e5057376520db6f8b.
APA encyclopegia.org. (2015). ceylon/user - Gitter. Retrieved November 24, 2026, from https://gitter.im/ceylon/user?at=5660a90e5057376520db6f8b
- Top 10 Ceylon language features Java wishes it had · retrieved 2019-11-28 · rev 1369099973
Cite this reference
MLA "Top 10 Ceylon language features Java wishes it had." 2019-11-28. https://jaxenter.com/top-10-ceylon-language-features-java-wishes-it-had-108003.html. Accessed 24 November 2026.
Chicago "Top 10 Ceylon language features Java wishes it had." 2019-11-28. https://jaxenter.com/top-10-ceylon-language-features-java-wishes-it-had-108003.html.
APA encyclopegia.org. (2019). Top 10 Ceylon language features Java wishes it had. Retrieved November 24, 2026, from https://jaxenter.com/top-10-ceylon-language-features-java-wishes-it-had-108003.html
- Ceylon 1.0 beta · retrieved 2013-09-25 · rev 1369099973
Cite this reference
MLA "Ceylon 1.0 beta." "Ceylon 1. 2013-09-25. http://ceylon-lang.org/blog/2013/09/22/ceylon-1/. Accessed 24 November 2026.
Chicago "Ceylon 1.0 beta." "Ceylon 1. 2013-09-25. http://ceylon-lang.org/blog/2013/09/22/ceylon-1/.
APA "Ceylon 1. (2013). Ceylon 1.0 beta. Retrieved November 24, 2026, from http://ceylon-lang.org/blog/2013/09/22/ceylon-1/
- Project Ceylon – Red Hat builds Java replacement · retrieved 2011-11-26 · rev 1369099973
Cite this reference
MLA "Project Ceylon – Red Hat builds Java replacement." 2011-11-26. https://www.theregister.co.uk/2011/04/13/red_hat_unveils_project_ceylon. Accessed 24 November 2026.
Chicago "Project Ceylon – Red Hat builds Java replacement." 2011-11-26. https://www.theregister.co.uk/2011/04/13/red_hat_unveils_project_ceylon.
APA encyclopegia.org. (2011). Project Ceylon – Red Hat builds Java replacement. Retrieved November 24, 2026, from https://www.theregister.co.uk/2011/04/13/red_hat_unveils_project_ceylon
- Principles that guide this project · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "Principles that guide this project." King, Gavin (2012-01-10). 2015-12-03. http://ceylon-lang.org/blog/2012/01/10/goals/. Accessed 24 November 2026.
Chicago "Principles that guide this project." King, Gavin (2012-01-10). 2015-12-03. http://ceylon-lang.org/blog/2012/01/10/goals/.
APA King, Gavin (2012-01-10). (2015). Principles that guide this project. Retrieved November 24, 2026, from http://ceylon-lang.org/blog/2012/01/10/goals/
- FAQ about language design: Goals · retrieved 2015-12-03 · rev 1369099973
Cite this reference
MLA "FAQ about language design: Goals." 2015-12-03. http://ceylon-lang.org/documentation/1.2/faq/language-design/#goals. Accessed 24 November 2026.
Chicago "FAQ about language design: Goals." 2015-12-03. http://ceylon-lang.org/documentation/1.2/faq/language-design/#goals.
APA encyclopegia.org. (2015). FAQ about language design: Goals. Retrieved November 24, 2026, from http://ceylon-lang.org/documentation/1.2/faq/language-design/#goals
Cite this article
MLA
"Ceylon (programming language)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/ceylon-programming-language. Accessed 24 November 2026.
Chicago
"Ceylon (programming language)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/ceylon-programming-language.
APA
encyclopegia.org. (2026). Ceylon (programming language). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/ceylon-programming-language
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON