Content deleted Content added
Undid revision 694014226 by Lukedegruchy (talk) as this person is closely associated with the project and posted biased information |
m Replaced claims of uniqueness in type system with comparative references to TypeScript etc |
||
Line 77:
One of the most novel aspects of Ceylon is its [[type system]]. Ceylon foregoes java's primitive types<ref>{{cite web|last1=King|first1=Gavin|title=Ceylon: Language Design FAQ|url=http://ceylon-lang.org/documentation/faq/language-design/}}</ref> and [[Object type|boxing]] in favor of a type system composed entirely of first-class objects.
Union types, written <code>A|B</code>, allow a variable to have more than one type.
The following example shows a Ceylon function which may take either an [[Integer (computer science)|integer]] or a [[String (computer science)|string]]:
|