Help

This 12-part tutorial, originally published as a series of blog articles, provides an informal introduction to the Ceylon language, geared toward Java developers.

  1. Basics: About Ceylon, Writing a simple program, Adding inline documentation, Strings and string interpolation, Dealing with objects that aren't there, Operators for handling null values, Defaulted parameters.
  2. Classes and members: Creating your own classes, Hiding implementation details, Abstracting state using attributes, Understanding object initialization, Instantiating classes and overloading their initializer parameters.
  3. Inheritance and introduction: Inheritance and refinement, Abstract classes, Interfaces and mixin inheritance, Ambiguities in mixin inheritance, Introduction, Introduction compared to extension methods and implicit type conversions, Type aliases, Member classes and member class refinement, Anonymous classes.
  4. Sequences: Sequences, Sequence syntax sugar, Iterating sequences, Sequence and its supertypes, Empty sequences and the Bottom type, Sequence gotchas for Java developers.
  5. Unions, algebraic types, and type inference: Narrowing the type of an object reference, More about union types, Enumerated subtypes, Visitors, Typesafe enumerations, Type inference, Type inference for sequence enumeration expressions.
  6. Generics: Defining generic types, Covariance and contravariance, Generic type constraints.
  7. Attributes and locals, control structures, and imports: Attributes and locals, Variables, Setters, Control structures, Sequenced parameters, Packages and imports.
  8. Higher order functions: First class and higher order functions, Representing the type of a function, Representing the type of a method, Defining higher order functions, Function references, More about higher-order functions.
  9. Named arguments and the builder syntax: Named arguments, Declarative object instantiation syntax, More about named arguments, Defining user interfaces.
  10. Basic types and operators: An overview of the language module, Equality and identity, Operator polymorphism, The Slots interface, Numeric types, Numeric literals, Numeric widening, Numeric operator semantics.
  11. Initialization: Self references and outer instance references, Multiple inheritance and linearization, Definite assignment and definite initialization, Class bodies, Initializer section, Declaration section, Circular references, Definite initialization of methods, Definite return.
  12. Annotations and interceptors: Annotations, Annotation arguments, Annotation types, Annotation constraints, Reading annotation values at runtime, Defining annotations, Interceptors.