A first look at Gavin King's Ceylon

Gavin King brought us Hibernate and Seam. Now he wants us to drink the Kool-Aid -- or rather the Ceylon tea -- once more

Page 4 of 4

Moreover, there is a matcher (above) on path but not on "method" forcing me to write something like this:

void contacts(Request request, Response response) {

if(request.method.equals("GET") &&

       request.path.equals("/contacts")) {

contactsGet(request, response);

} else if (request.method.equals("GET") &&


contactGet(request, response);

} else if (request.method.equals("POST")) {

contactsPost(request, response);

} else if (request.method.equals("DELETE")) {

contactDelete(request response);

} else if (request.method.equals("PUT")) {

contactPut(request, response);

} else {



This is especially glaring in a language that's generally less verbose yet clearer. More important, this is the kind of code monkey stuff I hate to write -- and why we have interns.

What you see is the kind of minor API design that will happen with a few people using it. This will most certainly happen as Ceylon matures.

Ceylon has a lot of nice features, from higher-order functions to function references. It has solid typing stuff like unions and intersections. I started to implement some of these into Granny, but thought better of it. My longest while statement comprises one line. I could have made a higher-order function, but would it be more intuitive or clearer? If I was doing something more than creating an object from a result set, maybe. In this case, no.

Personally, I categorize languages based on where you pay the pain. In JavaScript, for instance, I have a very short learning curve and rapid development. On a large JavaScript project, I start paying the pain at the end of the project while debugging.

For the uninitiated, Ceylon makes you take the pain up front, especially in getting used to its type system and the items it eliminates. However, I can already see it would probably pay it forward on my first debugging session with a larger project.

Moreover, if you've ever wanted to get involved in open source, these folks are some of the more helpful and motivated I've encountered. Many developers try their hand at mature projects and find there is no low-hanging fruit. This is your chance to work on something where people are motivated and helpful, and there's enough to be done that a new recruit can get involved easily.

Ceylon isn't ready for prime time yet, but it's very promising. Granny's Addressbook works in Ceylon (with a few caveats). Ceylon has a lot of great features, but many of them aren't needed for such a simple application. Still, use of Ceylon's more involved features made my code shorter, more concise, and easier to read. I look forward to seeing Ceylon develop.

This article, "A first look at Gavin King's Ceylon," was originally published at InfoWorld.com. Keep up on the latest developments in application development and read more of Andrew Oliver's Strategic Developer blog at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.

| 1 2 3 4 Page 4
From CIO: 8 Free Online Courses to Grow Your Tech Skills