Content deleted Content added
m →Entry point with names: clean up |
m →top: replaced: primitively-defined → primitively defined |
||
(10 intermediate revisions by 8 users not shown) | |||
Line 44:
}}
'''Ceylon'''
| url=http://ceylon-lang.org/blog/2013/09/22/ceylon-1/
| title=Ceylon 1.0 beta
Line 65:
| access-date=2015-12-04}}</ref>
* A type system enforcing [[null safety]] and list element existence at compile time
* Regular syntax and semantics, avoiding special cases and primitively
* Support for generic programming and metaprogramming, with [[Reification (computer science)|reified]] [[Parametric polymorphism|generics]]
* Modularity built into the language, based on [[WildFly|JBoss modules]], interoperable with [[OSGi]]<ref>{{cite web
Line 83:
The name "Ceylon" is an oblique reference to Java, in that [[Java]] and [[Sri Lanka]], formerly known as Ceylon, are islands known for growth and export of [[coffee]] and [[tea]].
In August 2017, Ceylon was donated to the [[Eclipse Foundation]]. Development slowed down and finally stopped in 2020.<ref>{{cite web
|date=2020-05-25
|title= ceylon / ceylon
|publisher=GitHub, Inc.
|url=https://github.com/eclipse-archived/ceylon
|access-date=2024-01-22
|archive-url=https://web.archive.org/web/20231003075404/https://github.com/eclipse-archived/ceylon
|archive-date=2023-10-03
|url-status=live}}
</ref> In April 2023, [[Eclipse Foundation]] declared the termination of the transition.<ref>{{cite web
|date=2023-04-05
|title= Eclipse Ceylon™ Termination Review
|publisher=Eclipse Foundation
|url=https://projects.eclipse.org/projects/technology.ceylon/reviews/termination-review
|access-date=2023-04-23
|archive-url=https://web.archive.org/web/20230423134055/https://projects.eclipse.org/projects/technology.ceylon/reviews/termination-review
|archive-date=2023-04-23
|url-status=live}}</ref>
== Language features ==
Line 91 ⟶ 108:
One of the most novel aspects of Ceylon compared to Java 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 some situations, it makes the type system more uniform.
Ceylon allows for union and [[intersection type]]s, in a similar fashion to [[TypeScript]], [[Whiley (programming language)|Whiley]] and Flow, which in fact, took the idea from Ceylon.
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]]:
|