Top 1,000 Features Creators Events Podcasts Extensions Blog Explorer CSV Download

Ceylon

< >

Ceylon is an open source programming language created in 2011 by Gavin King.

#263on PLDB 13Years Old 336Repos
Download source code:
git clone https://github.com/eclipse/ceylon

Try now: Riju ยท TIO

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 (JVM), and can be compiled to JavaScript. The language design focuses on source code readability, predictability, toolability, modularity, and metaprogrammability. Read more on Wikipedia...


Example from Riju:
shared void run() { print("Hello, world!"); }
Example from hello-world:
shared void hello() { print("Hello World"); }
// Hello world in Ceylon print("Hello, World!");
Example from Linguist:
"Test function for Ceylon" by ("Enrique") shared void test() { print("test"); } "Test class for Ceylon" shared class Test(name) satisfies Comparable<Test> { shared String name; shared actual String string = "Test ``name``."; shared actual Comparison compare(Test other) { return name<=>other.name; } }
Example from Wikipedia:
/* The classic Hello World program */ shared void run() { print("Hello, World!"); }

Language features

Feature Supported Token Example
Binary Literals โœ“
// \$([01]{4})(_[01]{4})+
Integers โœ“
// \d{1,3}(_\d{3})+[kMGTP]?
Floats โœ“
// \d{1,3}(_\d{3})+\.\d{1,3}(_\d{3})+[kMGTPmunpf]?
Hexadecimals โœ“
// #([0-9a-fA-F]{4})(_[0-9a-fA-F]{4})+
Strings โœ“ "
"Hello world"
MultiLine Comments โœ“ /* */
/* A comment
*/
Print() Debugging โœ“ print
Comments โœ“
// A comment
Line Comments โœ“ //
// A comment
Type Inference โœ“
Static Typing โœ“
Operator Overloading โœ“
Semantic Indentation X

View source

- Build the next great programming language ยท About ยท Resources ยท Acknowledgements ยท Part of the World Wide Scroll