Home » Author Archives: Gavin King

Author Archives: Gavin King

Why build your own type system?

ceylon-logo

In Ceylon 1.2 we’ve factored out the type system of Ceylon as an independent module, with minimal dependencies and a clean API. The ceylon-model project incorporates: an extensible object-oriented model of the type system in Ceylon, algorithms for reasoning about types at compile time—or even at runtime in a system with reified generics—and a framework for model loading, that is, ...

Read More »

A little more about type functions

ceylon-logo

My previous post about type functions generated some interesting discussion, here, and on reddit. Therefore, I think it’s worth tying up several loose ends from the earlier post. So here’s a collection of further observations about type functions. Warning: this post addresses some very technical details of how we’ve incorporated type functions into Ceylon’s type system. Don’t even bother continuing ...

Read More »

Constructors in Ceylon

ceylon-logo

Since the earliest versions of Ceylon, we’ve supported a streamlined syntax for class initialization where the parameters of a class are listed right after the class name, and initialization logic goes directly in the body of the class. class Color(shared Integer rgba) { assert (0 <= rgba <= #FFFFFFFF); function encodedValue(Integer slot) => rgba.rightLogicalShift(8*slot).and(#FF); shared Integer alpha => encodedValue(3); shared ...

Read More »

Programming with type functions in Ceylon

ceylon-logo

I’ve recently been working on some experimental new features of Ceylon’s already extremely powerful type system. What I’m going to explain in this post is known, technically, as: higher order generic types (or type constructor polymorphism, or higher kinds), and higher rank generic types (or rank-N polymorphism). Please don’t worry about this jargon salad. (And please don’t try to google ...

Read More »

Unique approach to observer/observable pattern in Ceylon

ceylon-logo

The essence of the famous observer/observable pattern is that you have an observable object that produces events of various kinds, and one or more observer objects that register themselves as interested in notification when these events occur. Of course, we represent each kind of event as a type, usually a class, though nothing prevents us from using an interface type ...

Read More »

Tuple and entry destructuring

ceylon-logo

The next release of Ceylon features an interesting range of new language features, including constructors, if and switch expression, let and object expressions, and destructuring of tuples and entries. In this post, I’m going to describe our new syntax for destructuring. A destructuring statement looks a lot like a normal value declaration, except that where we would expect to see ...

Read More »

Useless lying version ranges

ceylon-logo

A frequent request from the Ceylon community is support for version ranges in expressing module dependencies. There’s no doubt that our current module system is too inflexible in terms of dependency resolution in the face of version conflicts, and I have some reasonable ideas about how to address that problem without needing version ranges. But I would like to document ...

Read More »

Ceylon: Planning the future of Ceylon 1.x

ceylon-logo

With the release of Ceylon 1.1, we’ve reached a point where we need to do some serious thinking about what are our priorities for the development of Ceylon 1.1.5, 1.2, and beyond. I definitely don’t yet have a crystal clear vision of what is going to be in 1.2, so we’re also looking for community feedback on this. I do ...

Read More »

Typesafe APIs for the browser

ceylon-logo

A new feature in Ceylon 1.1, that I’ve not blogged about before, is dynamic interfaces. This was something that Enrique and I worked on together with Corbin Uselton, one of our GSoC students. Ordinarily, when we interact with JavaScript objects, we do it from within a dynamic block, where Ceylon’s usual scrupulous typechecking is suppressed. The problem with this approach ...

Read More »

Write in Ceylon, Deploy as OSGI, use in JEE

ceylon-logo

… or how to use Ceylon inside Java EE application servers. The Ceylon language is inherently modular, and is shipped with a complete infrastructure that allows leveraging this modularity out-of-the box. However Ceylon is not captive of its own infrastructure. After the Java and JS interoperability efforts, the 1.1.0 version has brought out-of-the-box compatibility with OSGI, which enables running Ceylon ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.