Home » Author Archives: Gavin King

Author Archives: Gavin King

Ceylon: Ceylon Bootstrap

ceylon-logo

Ceylon 1.2.2 was released back in March, and at the time it shipped with a new feature that did not make a lot of noise, but I think it’s worth explaining it a bit more in this blog. In general Ceylon developers have to download the Ceylon distribution in order to compile Ceylon code, and so do Ceylon users. When ...

Read More »

Ceylon: Object construction and validation

ceylon-logo

When porting Java code to Ceylon, I sometimes run into Java classes where the constructor mixes validation with initialization. Let’s illustrate what I mean with a simple but very contrived example. Some bad code Consider this Java class. (Try not to write code like this at home, kiddies!) public class Period { private final Date startDate; private final Date endDate; ...

Read More »

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 »

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