Content deleted Content added
Added info for new version 1.3.3 |
clean up, typo(s) fixed: heavily- → heavily using AWB |
||
Line 82:
== Language features ==
Ceylon is heavily
=== Type system ===
Line 163:
==== Enumerated types ====
Similar to Java and many other languages, and with a similar mechanism as algebraic types, Ceylon supports enumerated types, otherwise known as enums. This is implemented in Ceylon with a pattern of limiting the instances of an abstract class at declaration to a limited set of objects (in this case, singleton instances). Another way to implement this pattern is with the new constructor feature in Ceylon 1.2 where the objects are implemented as different named constructor declarations.<ref>{{cite web|last=King|first=Gavin|title=The Ceylon Language: 4.5.8 Enumerated classes |url=http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#classeswithcases|access-date=6 December 2015}}</ref>
<source lang="ceylon">
Line 223:
}
</source>
but any other shared function without parameters can be used as main calling the program with
<code>ceylon run --compile=force --run hello default</code>
|