Tour of Ceylon - unofficial
Tour of Ceylon - unofficial
About the Book
This book is just a compilation of the great documentation available at http://ceylon-lang.org/documentation/1.0/tour.
The purpose of this compilation is to provide the Ceylon documentation in multiple formats, because the web is not the only place for reading xD
But if you want an interactive experience i recommend you to go to their site..
Tour of Ceylon - unofficial is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at http://ceylon-lang.org/documentation/1.0/tour.
Table of Contents
- Introduction
-
Tour of Ceylon
- Before you start
- A really simple program
- Running the program from the command line
- Running the program from the IDE
- Continue the tour
-
Basics
- String literals
- Adding inline documentation
- Formatting inline documentation
- Escape sequences
- Verbatim strings
- String interpolation and concatenation
- Dealing with objects that aren’t there
- Optional types
- Operators for handling null values
- Functions and values
- Defaulted parameters
- Variadic parameters
- Fat arrows and forward declaration
- Numbers
- There’s more…
-
Classes
- Identifier naming
- Creating your own class
- Hiding implementation details
- Exposing parameters as attributes
- Initializing attributes
- Abstracting state using attributes
- Living without static members
- Living without overloading
- There’s more…
-
Attributes and variables, control structures
- Attributes and local values
- Variables
- Setters
- Control structures
- Condition lists
- There’s more…
-
Inheritance, refinement, and interfaces
- Inheritance and refinement
- Shortcut syntax for refinement
-
Refining a member of
Object
- Abstract classes
- Interfaces and “mixin” inheritance
- Ambiguities in mixin inheritance
- There’s more…
-
Anonymous and member classes
- Anonymous classes
- Member classes and member class refinement
- There’s more…
-
Iterables, sequences, and tuples
- Iterables
-
Iterating using
for
- Sequences
- Sequence syntax sugar
- Ranges
- Sequence and its supertypes
- Empty sequences and the bottom type
- Sequence gotchas for Java developers
- Tuples
- There’s more…
-
Type aliases and type inference
- Type aliases
- Member class aliases and class alias refinement
- Type inference
- Type inference for iterable constructor expressions
- Anonymous classes and type inference
- There’s more…
-
Union, intersection, and enumerated types
- Narrowing the type of an object reference
- Intersection types
- Union types
- Enumerated types
- Visitors
- Enumerated interfaces
- Enumerated instances
- More about disjointness
-
Coverage and the
of
operator - There’s more…
-
Generics
- Defining generic types
- Type arguments
- Covariance and contravariance
- Covariance and contravariance with unions and intersections
- Generics and inheritance
- Generic type constraints
- Fully reified generic types
- There’s more…
-
Packages and modules
- Packages and imports
- Modularity
- The module system
- Module-level visibility and package descriptors
- Dependencies and module descriptors
- Module archives and module repositories
- Module runtime
- Module repository ecosystem
- There’s more
-
Functions
- First class and higher order functions
- Representing the type of a function
- Defining higher order functions
- Function references
- Static method and attribute references
- Curried functions
- Anonymous functions
- More about higher-order functions
- Composition and curry
- The spread operator
- There’s more…
- Named arguments
- Iterable arguments
- Named arguments to variadic parameters
- Leaving out the parameter names
- Declarative object instantiation syntax
- Defining user interfaces
- There’s more…
-
Comprehensions
- Comprehensions
- Transformation
- Filtering
- Products and joins
- There’s more…
-
The language module
- An overview of the language module
- Equality and identity
- Operator polymorphism
- Comparison operators
- Set operators
- Indexed operations
- Characters and character strings
- Numeric types
- Numeric literals
-
Whole
andDecimal
- Abstracting over numeric types
- Numeric widening
- Collections
- There’s more…
-
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 functions
- Definite return
- There’s more…
-
Annotations and the metamodel
- Annotations
- Annotation constructors
- Annotation arguments
- Annotation types
- Annotation constraints
- Restrictions on annotation parameters and annotation arguments
- Reading annotation values at runtime
- Defining annotations
- The metamodel
- There’s more …
-
Interoperation with Java
- Depending on the Java SDK
- Depending on a Java archive
- Interoperation with Java types
- There’s more …
-
Dynamic typing
- Partially typed declarations
- Dynamically typed expressions
- Runtime type checking
- Example
- There’s more …
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them