Hacker News new | ask | show | jobs
by nikolay 3887 days ago
How is it better than Ceylon 1.2? Ceylon compiles to JVM bytecode, JavaScript, Dart, and will to LLVM in the future. As a language, it's a great superset of Java.

I posted [0] about the great new Ceylon 1.2 (which is backed by Red Hat), and nobody seemed to care, but there's so much hype about Kotlin - I don't get it!

[0] https://news.ycombinator.com/item?id=10474126

10 comments

Well, the community here basically discussed the topic in detail 2 days before, when Gavin announced the 1.2 release[0].

Now, on why things are the way they are currently, here are a couple of reasons.

- so far, the ceylon team focused their efforts on the language itself and less on the available platforms, and that's why there are no clear getting staring guides for basically anything: web, android, etc.

- the language itself has a very distinct feel: from the way you publish your api (using the shared annotation), to the way union types affect the language (new way of handling errors, etc) to the way you use iterables {String*} instead of lists. These are all great features, but until you get the hang of it, they feel different. For me, this is just a problem of documentation.

- There is a very strange misconception, for lack of a better word, that just because JetBrains is building a great kotlin IDE, the ceylon IDE is somehow lacking. Which is not true at all. The eclipse plugin works great, and they'll also have an Intelij plugin soon.

[0] https://news.ycombinator.com/item?id=10463464

Not better -- different. In my opinion, it's best to read the two language's design goals to understand the difference (as those matter a lot more than any particular feature). The Kotlin design goals are outlined in the blog post, and the Ceylon design goals can be found here[1]. IMO, a TLDR would be: Ceylon attempts to replace not just the Java language but also the standard libraries, while Kotlin intends to upgrade the language only and blend into the existing ecosystem. That difference explains many if not most of the decisions regarding the particular features of each language.

[1]: http://ceylon-lang.org/documentation/1.1/faq/ + http://ceylon-lang.org/blog/2012/01/10/goals/

I suspect much of the excitement around Kotlin is coming from Android developers that see the language as their deliverance from Java 6.5.
Kotlin has a real potential to replace Java for Android, since Android is stuck with Java 1.6. I think a lot of this buzz and excitement comes from the Android side.

Ceylon has yet a solid Android support I think (I could be wrong)

I have not tried on Ceylon so I cannot comment whether it is better or worse than Kotlin.

> Ceylon. As a language, it's a great superset of Java

You're using the word "superset" quite loosely. A superset of Java would compile Java syntax into bytecode with all the same semantics as the equivalent Java code, as well as bring its own additions, which Ceylon clearly doesn't do. Groovy claimed to be a "superset" of Java but a handful of various syntactic elements behaved differently e.g. the == operator, catching many unawares. It's not introducing any Java 8 syntax changes, its backers flippantly saying "we'll leave them for Groovy 3". They tried to maintain a rough equivalence between the syntaxes for years by using annotations instead of new keywords, then one day its project manager changed "@Trait" to "trait" in a move that reeked of favoritism.

Don't know Ceylon or Kotlin except superficial poking around the websites.

So, let me ask you, how is Ceylon better than Kotlin? I'd like to see a good write-up (separate blog post) that compares and contrasts the two. What are use cases where one language would be significantly better than the other?

(Edit) Wow! Did not expect such a dearth of samples (for both languages) on Rosetta Code.

http://rosettacode.org/wiki/Category:Ceylon

http://rosettacode.org/wiki/Category:Kotlin

and only one overlap:

http://rosetta.alhur.es/compare/Ceylon/Kotlin/#

Given that a strength of Kotlin is that you can dumb-port Java straight to it without even thinking about it, I'm not really surprised it doesn't have much presence on Rosetta Code. It's not the right audience.
Especially after looking into this: http://rosetta.alhur.es/compare/Ceylon/Kotlin/# which another guy posted here, it's pretty clear that NOBODY wants ceylon. Why? Syntax. Scala, Kotlin are loved by many cause of one simple fact. Their syntax. Ceylon tries to do something very differntly, which many people won't like.

I mean lets look here: variable value doors = [ for (_ in 1..count) closed ]; nobody even understands this. and this is the first "real" line.

then look at Kotlin: val doors = Array<Boolean>(100, { false }) everybody will understand what it does, you don't even need to know kotlin.

> I mean lets look here: variable value doors = [ for (_ in 1..count) closed ]; nobody even understands this. and this is the first "real" line.

Doesn't seem too bad coming from Python with list comprehensions.

It's got a really solid IDE seeing as JetBrains are the one that built the language.
Also, you can have Kotlin and Java sitting side-by-side which makes for migrating codebases much easier.
Ceylon is too radical. If i'm going to invest the effort into Ceylon I might as well use Scala. Kotlin hits the sweet spot.
android! compiling to javascript, dart and llvm are all nice-to-have; there are tons of good languages that do that. there are very few good languages for writing android code, and from what i can tell, kotlin promises to do it with the fewest tradeoffs in performance, app size and tooling.