Home » Author Archives: Gavin King

Author Archives: Gavin King

Ceylon on Java 9 + Jigsaw

ceylon-logo

Everyone is talking about modules these days. New languages try to incorporate them, and older languages try to retrofit them in. Which is great news, because modules are essential. Java 9 is around the corner, because it’s supposed to come out next year, and the really big new feature is modularity, which it calls the Jigsaw project. Ceylon is a ...

Read More »

Modelling failure in Ceylon

ceylon-logo

In all programming languages, we need to deal with operations than can “fail”: a pure function might fail to produce a result, or an impure function might fail to produce its desired side-effect (create a new file, or whatever). In neither case can we just blindly continue with the rest of the computation. In the first case, the result of ...

Read More »

Dependency injection in Ceylon with Weld and Guice

ceylon-logo

I’m personally ambivalent about the benefits of dependency injection. On the one hand, I recognize its usefulness in certain container environments such as Java EE. (For the record, I was the author of the CDI 1.0 specification, with my JCP Expert Group.) On the other hand, given the nature of what I’ve been working on for the last few years, ...

Read More »

Porting Ceylon IDE to IntelliJ

ceylon-logo

We’ve had many questions about developing Ceylon in IntelliJ IDEA, so I thought it would be worth a quick status update. TL;DR: The screenshots are below. As you might know, Ceylon already has the most feature rich IDE of any modern language for the JVM, with some features that even the Java IDE for Eclipse doesn’t have. But IntelliJ users ...

Read More »

Ceylon: Why you might want to choose Ceylon

ceylon-logo

In a couple of days Ceylon 1.2 will be released, after a year of development. That’s exciting for us, but we think it would be interesting to summarize our thoughts about why you should be excited about Ceylon, and why you might consider it over other programming languages designed to run on the Java and JavaScript virtual machines. Ceylon is ...

Read More »

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 »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials