Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Looking for the recent and powerful upcoming programming languages over net, I came across Ceylon. I dropped in at ceylon-lang.org and it says:

Ceylon is deeply influenced by Java. You see, we're fans of Java, but we know its limitations inside out. Ceylon keeps the best bits of Java but improves things that in our experience are annoying, tedious, frustrating, difficult to understand, or bugprone.

What are the advantages of Ceylon over Java?

share|improve this question

closed as primarily opinion-based by gnat, MichaelT, Simon, Robert Harvey, World Engineer Nov 19 '13 at 14:59

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Hmmmm, I checked around on their site and found no compelling explanation to why I would like to switch to Ceylon from Java... fair enough, they are still in the early phase, so maybe they don't want to raise hype too early and then disappoint... –  Péter Török May 17 '12 at 8:01
1  
Mmm, I thought it was yet another language by an overenthusiastic programmer (not that there is anything wrong with that :P ), but I see Gavin King of Hibernate's fame is in the team, which is reassuring. Still, I don't see who would choose Ceylon over other languages such as Scala, Groovy or Clojure. –  Andres F. May 17 '12 at 12:38
1  
1  
@AndresF. looks like it is a Red Hat project. Should warrant some traction, but as always it is hard to say if this will be maintained as long as the rest of us wants. Java has proven to be backward compatible for the last 16 year - that is hard to beat for now. –  user1249 Sep 11 '12 at 9:37

5 Answers 5

up vote 27 down vote accepted

Ceylon seems like a nice fun language but I'd argue it has relatively few "advantages" over Java.

I think it has a nicer syntax and some more "modern" language features - though this is subjective and I'd argue should be relatively minor factors in choosing a programming language.

Much more important factors when choosing a language / platform for a serious project:

  • Does it enable you to develop in a better paradigm for your given problem? (no - Ceylon is clearly yet another language in the over-crowded statically-typed Java-like OOP space. Contrast with e.g. Clojure which is targeting the functional language space or Groovy which is a very dynamic OOP JVM language so they are addressing different niches)
  • Has it got a better library ecosystem? (no chance.... Java is unmatched in this regard. At best you'd probably just end up using the Java libraries from Ceylon)
  • Can you get more skilled developers? (unlikely, few people are currently using Ceylon and even if they did there would be a big learning curve to climb)
  • Has it got better tools? (no - Java tooling is very comprehensive and mature)
  • Does it make you more productive? (debatable - it has some nice productive language features, but combined with learning curve and tooling effects it might actually end up behind)
  • Does it provide better performance? (no - the JVM is extremely well optimised for Java, it's a tough call for any other JVM language to beat it. Scala comes close, but that's after many years of fine-tuning...)
  • Does it support more target platforms? (no - it's a JVM language so exactly the same as Java)
  • Is the code going to be more maintainable? (probably not - Java has stood the test of time here precisely because it is relatively stable, mature and doesn't have a lot of advanced language features that might confuse future maintainers)
  • Is there a large, active and helpful community? (no, at least not compared to Java or the other big JVM languages like Scala, Clojure, Groovy etc.)

Overall I'd certainly encourage people to experiment with Ceylon and have fun with it from a learning perspective.

But I don't currently see any compelling advantages that would make large numbers of people want to switch to it (or choose it ahead of other JVM languages like Clojure, Scala, JRuby or Groovy).

share|improve this answer
    
IMHO the VM and the library ecosystem are going to be the toughest calls. From some comments it seems that they plan to design write both from scratch... which is going to take a looooooooooooooooooong time to yield something even comparable to what Java already has... –  Péter Török May 17 '12 at 7:59
    
@Peter good points. There seems to be quite a lot of "Not Invented Here" syndrome in Ceylon, e.g. the redesign of all the collection library. Not sure this is very sensible - apart from the fact that the Java libraries are already excellent, it will make interoperability much harder. Clojure is much more pragmatic for example - all Clojure data structures just implement the relevant java.util.* interfaces, so interoperability is trivial. –  mikera May 17 '12 at 8:25
1  
Also, I think your evaluation of some points is not really valid since Ceylon isn't even finished yet, so there's no point in comparing it to other languages that have been around for years now. –  Chochos May 17 '12 at 17:10
4  
@Chochos - you can also compile Java to JavaScript (Google Web Toolkit does this) so it's nothing in addition to what Java does. I agree Ceylon is clearly not finished, however I think all of my points are valid now and are unlikely to change in the next 5 years at least (even if the Ceylon team finish all of their current roadmap). –  mikera May 18 '12 at 0:26
2  
@mikera - The "is there a large community" is, of course, a killer argument for each and every upcoming language. That being said, a small community is often more responsive and competent. (Look what scrap concerning Java is written all day over there at SO ....) –  Ingo Nov 15 '13 at 12:50

As far as I noticed, one of the biggest difference between Ceylon and other "hobby-created" JVM languages is that it's gonna be backed by Red Hat / JBoss. So it's gonna get a really nice tooling set integrated into JBoss Tools / Developer Studio, good interactions with JBoss AS / Gatein Portal and all the Midleware / JEE 6 / BRMS. So you might at some poing develop full fledged Ceylon applications in JSF, very productive portlets with a PHP "change and refresh cycles" and what not.

As most JVM-based languages, I don't see it as a replacement for Java for projects needing huge code-bases, but for some small to mid size projects, especially once which are very modular (like CRUD-intensive, portlets, etc). I think it's gonna be extremely well received in the web world, especially by JBoss fans.

share|improve this answer
    
"Ceylon and other "hobby-created" JVM languages". So Scala and Kotlin are hobby-created languages? –  Oliver Plow Nov 15 '13 at 23:20
    
I think the way the Ceylon IDE creates module definitions for you when you create a Ceylon project is an inspiration for Jigsaw. They Ceylon IDE makes it easy for the user to have modularization. With OSGi it's very cumbersome as you have to play around with maven plugins and various parameters. I guess the Jigsaw people at Oracle will take notice of the smart user-friendly tool integration in the Ceylon IDE and try to produce something similar for Jigsaw. –  Oliver Plow Nov 16 '13 at 11:50

It has some nice features not found in java:

  1. Reified Generics
  2. Type Inference
  3. Mixins (although this is coming in JDK8)
  4. Union and Intersection types (which is really cool and not found in many languages)
  5. "Higher order functions" (although not quite functions as first class objects)
  6. Closures (also coming in JDK8)
share|improve this answer
    
3. Defender methods in JDK8 can deliver some of the functionality of mixins, but they come neither close to mixins nor traits. 4. Union and intersection types are a weird concept to me. I have problems to understand the added value. AFAIK it only saves you some typing effort when not having to define an interface that combines two other interfaces. Other than that I'm sure that Java will never have any advanced feature found in Scala/Kotlin/Ceylon/whatever that is a problem for binary backwards compatibility. So abandonning Java as with Ceylon has some justification. –  Oliver Plow Nov 16 '13 at 11:52

I think Ceylon is interesting in many ways. And maybe they are right in the way that you need to depart from Java in some ways if you want to leave some problems of Java behind you. Ceylon seems to have quite a few language features and I hope this does make the compiler slow as in Scala or even worse cause build times that don't scale with the code size (see Two years of Scala experience feedback). The pace of the Ceylon dev team is quite impressive.

Kotlin is still 0.6 and, judging from their development speed in the last year, I would say about a year away from 1.0. It does not have that many language features like Ceylon (but those important ones java is missing like traits and extension methods) and seems to be more some kind of Scala without the problems of it. I guess scalable build times won't be a problem with it. But Kotlin can only be a nicer Java like Groovy. It can't provide a way out of Java commodity programming with XML dependency, boilerplate code, byte code manipulation, etc. It is something like Java and Scala done right. Whether Kotlin or Ceylon will be able to make a difference remains to be seen. I think both attempts are worth the effort and I wish them both good luck.

share|improve this answer

Ceylon is producing a specification during its development, like all the big JVM languages (i.e. all those mentioned above except Groovy)...

Ceylon (http://ceylon-lang.org/documentation/1.0/spec)

Clojure (http://clojure.org/Reference)

Scala (www.scala-lang.org/docu/files/ScalaReference.pdf)

Java (http://docs.oracle.com/javase/specs/jls/se7/html/index.html)

JRuby follows Ruby's spec which must be paid for (http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579).

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.