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

A few weeks back, in "7 programming languages in 7 days," I intended to include Ceylon, but its creator Gavin King insisted it was too soon. Now Ceylon has released Milestone 5 with an HTTP package, making it possible for me to do the inevitable: Port Granny's Addressbook to Ceylon.

My assessment? While Ceylon is still not ready to anchor a large project, it's worth an early look. There's a lot to like about Ceylon -- as well as a number of frustrating details.

[ Epic codefest: 7 programming languages in 7 days | Learn how to work smarter, not harder with InfoWorld's roundup of all the tips and trends programmers need to know in the Developers' Survival Guide. Download the PDF today! | Keep up with the latest developer news with InfoWorld's Developer World newsletter. ]

The Ceylon IDE
The Ceylon IDE is essentially a set of plug-ins for Eclipse. While it works well for a milestone release, it is not entirely stable and at times freezes inexplicably. Nevertheless, those with a Java background will find it comfortably familiar. The debugger works, but imperfectly; sometimes the variables view isn't populated or you see more of Ceylon's underbelly than your actual variables.

There is relatively good integration with the language and its features, but it lacks shine. For instance, I think the modules.ceylon file deserves its own icon or visual clue to let you know it's special.

Modules
Speaking of modules, Ceylon integrates the concept of modules and a module repository. This is probably my favorite part of Ceylon.

If you're familiar with Java's Maven or Ivy, Perl's CPAN, or Ruby's gems, you're familiar with modules and repositories. But Ceylon improves substantially on its Java roots. Maven modules have no real relationship to Java; they're simply loaded into its class path. Ceylon makes modules a first-order member of the language and its environment independent of the build system. Unlike Java, where there are always weird bugs with how Maven views the world versus the IDE's view, this works seamlessly in Ceylon. Upgrading to a new module is simply a matter of updating your module.ceylon file.

module com.osintegrators.example.ceylon.hello '1.0.0' {

import ceylon.net '0.5';

import ceylon.dbc '0.5';

import java.jdbc '7';

import java.base '7';

}

Modules must then be imported in your runnable source code with the import statement:

import java.sql { DriverManager{ getConnection }, Connection{...}, ResultSet, Statement, PreparedStatement}

1 2 3 4 Page
From CIO: 8 Free Online Courses to Grow Your Tech Skills
Join the discussion
Be the first to comment on this article. Our Commenting Policies