Although quite young (just released 1.0-beta), Ceylon holds a lot of promise in these very areas. Watching its development, it is clear that the arcane complexities of type theory are routinely decomposed into abstractions that a developer may never interact with, but it allows her to say more, more clearly – the motto of the language. More than just a slogan, it seems to be the guiding philosophy of the language and the lead, Gavin King (of Hibernate, Seam and CDI fame) has stuck to the specification and its lofty goals
Backed by RedHat, Ceylon is enterprise-ready.
A Subjective Comparison
Ceylon builds on top of Java, has bidirectional interoperability with Java (and even Maven) but is not a drop-in replacement for individual Java classes.
Java is the beloved old workhorse and its strictures and sober evolution have managed to bring library breadth, security and stability to enterprise development and inspired C# and many other languages. Java was the rightful heir to C and innovation in Java was reluctantly pushed on it by those who stretched its strictures. That was the state of affairs before open-source was fully accepted.
Java's strength became its weakness in an open world. Scala brought new theoretical constructs to the JVM and forced us to clearly distinguish between Java and the JVM. Its strength and weakness is that it is a drop-in replacement for Java. Let's not provoke a flame war by commenting on its syntax! In my opinion, Go and Kotlin are still making it up as they go along.
Do you see where I am going with this? As with any language, strengths become weaknesses unless strictly constrained by force of character. Ceylon promises to have that character, and if it develops an easy on-ramp for all levels of developers and sticks to its guns, we will be hearing a lot more of what can be said in it.
You will find a lot of the details on the website, but let me quickly recap the high-level technical features that I think developers, and their employers, will love:
- The declarative syntax and static top-level objects and functions can be intuitively used from basic scripting and templating to building the most abstract of frameworks. Once the ecosystem develops, Ceylon modules might be all that you need.
- While a developer is concentrating on programming a solution to a business problem, Ceylon provides the kind of sure-footedness that is reminiscent of fast German cars. As you code, you naturally know what your variables are, their state and what they can become. The strictures of the language do not allow null-pointer exceptions or class-cast exceptions. The up-front time investment is immediately rewarded by fluency (despite a lot of indent levels), but the real reward is when you are pleasantly surprised that a major re-factoring resulted in just a few logic errors -- and no wiring errors.
- Type manipulation. Want to send back two objects from a function? No problem, No need to wrap them in a holder ‘bean’ – just intersect/union them, or put them in brackets. Want to accept a random iteration of many different types as a parameter, with at least one element?. Just 'or' the types with a + at the end. Soon, the natural flow grows on you. And once you have made an initial mess with all kinds of types floating around, re-factor to your heart’s content and the language will guide you along. If the type definitions become too complex, alias the expression with a nice name. Basically, Ceylon doesn't get in your way while the creative juices are flowing and then gives you the tools to mop things up nicely with its extremely sophisticated under-the-covers type wizardry.
- Although compile-to-build-to-deploy modularity will continue to evolve, it is already ahead of what Java Jigsaw may offer next year.
The community around Ceylon is disciplined, agile and hyper-excited. That leads to quick and solid feedback to issues and any last-minute changes before 1.0.
Ceylon should be a definite consideration for when you question what framework or language you are going to use for your next enterprise project.