Ceylon (programming language): Difference between revisions

Content deleted Content added
Catchiaro (talk | contribs)
m Replaced claims of uniqueness in type system with comparative references to TypeScript etc
Catchiaro (talk | contribs)
m Fixed typo and added comparative text
Line 75:
 
=== Type System ===
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. While this may cause boxing overhead in certain situations, it makes the type system more uniform.
 
Ceylon allows for union and intersection types, in a similar fashion to TypeScript, Whiley and Flow. Negation types, as supported by Whiley, is not supported.
 
Union types, written <code>A|B</code>, allow a variable to have more than one type.
Line 135:
 
==== Functions ====
Similarly to many modern languages, Ceylon suportssupports first class functions and higher order functions, including function types and anonymous functions <ref>{{cite web|last=King|first=Gavin|title=The Ceylon Language: 4.7 Functions |url=http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#functions|accessdate=5 December 2015}}</ref>
 
<source lang="ceylon">