PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Ceylon

Ceylon

Ceylon is a pl created in 2011 by Gavin King.

#224on PLDB 11Years Old 1.2kUsers
0Books 0Papers 336Repos

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"); }
Example from the Hello World Collection:
// 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 Example Token
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
//
Static Typing
Operator Overloading
Semantic Indentation ϴ
fstar.html · ceylon.html · stata.html

View source

PLDB - Build the next great programming language · v2022 · Day 32 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com