Ceylon is an open source programming language created in 2011 by Gavin King.
#296on PLDB | 13Years Old | 336Repos |
git clone https://github.com/eclipse/ceylon
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...
shared void run() {
print("Hello, world!");
}
shared void hello() {
print("Hello World");
}
// Hello world in Ceylon
print("Hello, World!");
"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;
}
}
/* The classic Hello World program */
shared void run() {
print("Hello, World!");
}
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 | ✓ | ||
Comments | ✓ | // A comment | |
Line Comments | ✓ | // A comment | // |
Type Inference | ✓ | ||
Static Typing | ✓ | ||
Operator Overloading | ✓ | ||
Semantic Indentation | X |