14 ms·
Why you might want to choose Ceylon
- lmm 11y agoHave they tightened up the floating point semantics? Or do you still get different rounding behaviour on the JVM, dart and JS? I want to like Ceylon because it's the language Scala should be (assuming that higher-kinded types made it in - I could never work without them). It's Scala with all the ugly parts polished away, Scala with ten years' progress in language design. But it does nothing that Scala can't. Scala might need a pile of bodges to offer these things - Shapeless implicit macros to use tuples generically, type-level libraries abusing the implicit resolution rules to implement unions, a retrofitted JavaScript backend. But that stuff has been written now, and as a developer it works - maybe with a couple of ugly extra lines here and there, but that's all. I'm glad it exists, but I just can't see people choosing the more polished language over the one with ten years worth of library and tool support when there's no USP beyond that polish.
- lukedegruchy 11y agoExperimental support for higher order generics will be in 1.2 (JavaScript runtime only): http://ceylon-lang.org/blog/2015/06/03/generic-function-refs/ http://ceylon-lang.org/blog/2015/06/03/generic-function-refs... http://ceylon-lang.org/blog/2015/06/12/more-type-functions/ http://ceylon-lang.org/blog/2015/06/12/more-type-functions/
- kitd 11y agoI agree somewhat. One feature of Ceylon that caught my attention however is that Ceylon modules are implicitly OSGi modules. If you are building a microservices-type JVM application based on OSGi, Ceylon could make this a lot easier.
- taiar 11y agoAgreed! Ceylon modularity is awesome!
- pjmlp 11y agoFully agree. I dabble with whatever new languages come out as any other language geek, but at work it only matters the languages validated by the IT department or requested by the customer. So, like many, I only work with languages blessed as first class languages in vendor SDKs. With Scala and Clojure barely being adopted by most Java shops (in perpetual terms), I don't see where Ceylon might fit in without a story to sell.
- bburshteyn 11y agoHave you checked out Hello at www.amsdec.com?
- pjmlp 11y agoNo, I wasn't aware of it.
- pjmlp 11y agoAarrg auto-correction. perpetual => percentual
- TazeTSchnitzel 11y ago> Have they tightened up the floating point semantics? Or do you still get different rounding behaviour on the JVM, dart and JS? Doing so ought to be trivial if they haven't. Java has a mode where it uses doubles everywhere. JavaScript has Math.fround() for single-precision arithmetic.
- pron 11y agoI think it's part of a general trend of language designers (and even language fans) not understanding what makes languages work in practice. For academic languages this may not matter, but if you actually want your language to be used, you need to pay attention. A recent study[1] has shown that "extrinsic" factors (performance, tooling, familiarity, libraries) matter a lot more than intrinsic factors (syntax, abstractions) when it comes to adopting programming languages. A language that understood this beautifully was Java[2] (and, I believe, Go, which is very much in the spirit of the Java philosophy), that analyzed existing "advanced" languages like Scheme, Self and Modula (and indeed some of the people involved with those languages were among Java's early designers) and realized that the features that give those languages most bang-for-the-buck weren't clever abstractions but extra-linguistic features such as GC, dynamic linking and JITs[3], that can be packaged in a crude, "blue-collar" language that's familiar (and familiarity is indeed among the top factors in choosing a language, while "correctness" -- as in more powerful type system -- and particular language features are among the last). James Gosling called it a wolf in sheep's clothing. A wolf in wolf's clothing may look more fierce, and the sheep's clothing may indeed limit its maneuverability a bit, but it can still be almost as wolfish, yet much more palatable. OTOH, Kotlin took whatever it could from Ceylon (the nullability types, flow-sensitive typing) while keeping 100% seamless interoperability with Java as the top priority, so it may not be a revolution, but its adoption costs are virtually zero. It doesn't even have much of a runtime library; it was designed in such a way that all cool features could be applied to Java's standard library. The idea was that abstractions are great as long as they don't come at the expense of more important features, such as availability of libraries, tools etc (Kotlin even supports Java's annotation processors, so popular libraries that rely on compile-time verification/code-generation such as Dagger can work on Kotlin code). Of course, I take this much further than you and believe, unlike you, that the contribution of advanced language-level abstractions is not so pronounced at all (or, at least, it hasn't been shown to be significant), and obviously I have a very different perspective on Scala than you, but at least we can agree on something :) [1]: Paper: http://lmeyerov.github.io/projects/socioplt/papers/oopsla2013.pdf http://lmeyerov.github.io/projects/socioplt/papers/oopsla201... Accompanying talk: https://www.youtube.com/watch?v=v2ITaI4y7_0 https://www.youtube.com/watch?v=v2ITaI4y7_0 [2]: https://youtu.be/Dq2WQuWVrgQ?t=14m12s https://youtu.be/Dq2WQuWVrgQ?t=14m12s about why Java was designed the way it was [3]: Sun had experimented with a JIT for Self long before it was introduced to Java, and the plan was to make Java exploit JITs almost from the get-go.
- taiar 11y ago> I want to like Ceylon because it's the language Scala should be > but I just can't see people choosing the more polished language over the one with ten years worth of library and tool support when there's no USP beyond that polish It seems all a matter of time. What would Ceylon look like to you after some years of library and tool support?
- lmm 11y agoThe thing is Scala will always be 10 years ahead. I see Ceylon's future as looking like e.g. D - a better language than the alternatives in its niche, but without a USP to justify migration.
- moomin 11y agoThat's a big assumption to make. And probably one someone made about COBOL once...
- lucozade 11y agoI don't think the assertion is that Scala won't be superceded. I think the assertion is that it is not obvious why it would be superceded by Ceylon. So, if there's no obvious reason to move to Ceylon, who is going to get the ecosystem to a level that it will compete with Scala's? Now, I personally wouldn't be so bold as to suggest that it will always be 10 years behind Scala. I have no idea. But it isn't clear why the language itself is offering sufficient advantage. More likely, at least to me, is that some of the ideas that Ceylon's shown are practical e.g. union and intersection types, will find their way into more languages because of it. Of course, someone could produce the next big thing in it tomorrow and do for Ceylon what Rails did for Ruby. Then I'd go find a hat to eat.
- UnFroMage 11y agoDon't forget that, running on the JVM with great interop means that any Ceylon program has instant access to a huge ecosystem, including not just Java libraries but also Scala libraries. I was able to use Apache Spark in Ceylon ;)
- bad_user 11y agoA language without higher-kinded types or type-classes cannot be the language that "Scala should be". And these aren't things that can be easily added later. And I don't think it will ever happen. And don't get me wrong, but software is about trust and I do not trust somebody like Gavin King for delivering a good language after Hibernate :) > Shapeless implicit macros to use tuples generically What can you do in Ceylon about this? Or are we talking about a dream? > a retrofitted JavaScript backend Not sure what you mean. Scala.js is reusing the Scala compiler in what happens to be the cleanest transition I've seen to such a different platform. And compared to other Javascript compilers, like ones for Ocaml or Haskell, this one actually works well and stays up to date. Care to explain?
- lmm 11y ago> A language without higher-kinded types or type-classes cannot be the language that "Scala should be". And these aren't things that can be easily added later. In other words I don't think it will ever happen. I mentioned higher-kinded types; last I knew they were an experimental feature. I thought Ceylon offered some way to do "open interfaces" (the vital part of typeclasses IMO)? If not then that's definitely an issue. > And what can you do in Ceylon about this? Or our we talking about a dream? In Ceylon you have arity abstraction over tuples built in, so you can do HList-style operations by default. Scala will supposedly add this in Don Giovanni but in the meantime you have to use Shapeless with its implicit macros and it's slightly less nice (e.g. the error messages are less clear). >Scala.js is reusing the Scala compiler in what happens to be the cleanest transition I've seen. Care to explain? I think it's fair to call Scala.js "retrofitted", and I think the article is right that a language that was designed from the ground up to be JVM-independent will inevitably be better at it. My whole point was that these are minor rough edges to Scala that aren't really that important, so I'm not sure why you're being so defensive.
- bad_user 11y agoSorry, I sound defensive only because I'm in a bad mood, nothing to do with the subject at hand. Thanks for the clarifications.
- 11y ago
- lighthawk 11y agoI looked for example projects in Ceylon with step-by-step info on how to setup/deploy: * Hello World web application * Simple online store implementation (authN, database access via ORM layer, logging) * Todo MVC implementation * RESTful/XML/SOAP web services * RESTful/XML/SOAP clients * Examples for writing AngularJS and React front-ends with Ceylon back-end services, with info on how to host such as to minimize and cache assets and server-side query caching and either side-loading or multi-table joined/extended data structures, updating and reading/accessing those data structures partially. * Examples for easily timestamping and userstamping models * Examples for using testing frameworks: unit, integration, (web) acceptance Here's what I found in looking for that: * This hello world: http://ceylon-lang.org/documentation/tour/basics/ http://ceylon-lang.org/documentation/tour/basics/ * No Ceylon JS example at http://todomvc.com/ http://todomvc.com/ but this Todo list: https://github.com/vietj/cayla-mvvm/blob/master/source/io/cayla/todomvc/TodoList.ceylon https://github.com/vietj/cayla-mvvm/blob/master/source/io/ca... * Two examples in what I assume is the official examples git repo at: https://github.com/ceylon/ceylon-examples https://github.com/ceylon/ceylon-examples containing N-queens and Game of Life only. Also, I'd want to see benchmarks. Show me how much it is "like" performance of equivalent Java, Dart, and JS as is claimed by comparing to maybe a Play Framework app, the Dart example client-server https://www.dartlang.org/server/google-cloud-platform/app-engine/client-server/ https://www.dartlang.org/server/google-cloud-platform/app-en... , and a simple MEAN stack and/or full-stack example using ReactJS. In addition to those examples, I'd want to see a larger community behind it with a variety of projects, e.g. specialized ORM, larger web app/services framework, simple web app/service framework each that have their own communities using it. I think it is cool, but I don't think it is even in the same ballpark with solutions/combinations like Play+Scala, MEAN, Rails, Elixir+Phoenix, etc. for wide application in web/services.
- taiar 11y agoHere are some other articles with examples I recently wrote on Ceylon: - http://taiar.github.io/log/2015/10/09/ceylon-programming-language.html http://taiar.github.io/log/2015/10/09/ceylon-programming-lan... - http://taiar.github.io/log/2015/10/23/ceylon-programming-language-usage.html http://taiar.github.io/log/2015/10/23/ceylon-programming-lan... Basic toy stuff but has some points on Java interoperability and explores other language aspects.
- danesparza 11y agoThis is great, but who is using it? I enjoy learning new languages, but knowing who is using it (and perhaps why) is a good indicator of momentum in my opinion.
- sz4kerto 11y ago> its powerful Eclipse-based IDE :( This is something that would, in itself, direct me to Kotlin or something else. I know that Eclipse is a better fit for Ceylon (because both are intimately related to OSGi), but I really wouldn't want to go back.
- netcraft 11y agoI agree, but there does seem to be some development towards an intellij plugin for it: https://github.com/ceylon/ceylon-ide-intellij https://github.com/ceylon/ceylon-ide-intellij
- mikegirouard 11y agoThere is also Vim support (albeit a work in progress) https://github.com/chochos/ceylon-vim https://github.com/chochos/ceylon-vim
- kitd 11y agoThe past couple of versions of Eclipse have really moved it on IMHO. Mars is a great IDE.
- epalmer 11y agoI guess for me I don't need nor want JVM + JavaScript VM interoperability. My gut says this limits what can be done. I would rather have just one or the other. Maybe others feel differently.
- oldmanjay 11y agoMaking technology decisions with your gut is tricky. What if you happen to be hungry? The signalling will be all confused.
- gavinking 11y agoWell, y'know, you could go with your gut - or you could actually try it out for yourself! I think you'll decide your gut was wrong, but there's only one way to be sure.
- codazoda 11y agoThis language looks pretty cool, but I do agree with your gut. The FAQ says: "Note that not all Ceylon modules are available for both platforms. A module might be cross-platform, it might by JVM-only, or it might be JavaScript-only. Of course, ceylon.language is completely cross-platform." Having some modules for JVM and some are for JavaScript-only would make things a little bit more confusing than if the language picked one. I haven't decided if this is a very significant thing or not.
- gavinking 11y agoWell where there is a big difference between the underlying capabilities of the platform, differences are unavoidable. I mean, examples of things that are cross-platform in Ceylon: collections, localization, promises, regexes, HTML construction, logging, testing, dates/times. Examples of things that are platform specific: I/O, database access, filesystem access, distributed transactions, the HTTP server. That's pretty reasonable and natural, isn't it?
- lomnakkus 11y agoThe date/time cross-platformness is a big deal for business-type applications, at the very least. You tend to transfer/use a lot of dates/timestamps/what-have-you in that type of application. (This is a constant source of pain for me in scala.js.)
- aembleton 11y agoIt doesn't have extension functions. Since moving to Kotlin for my projects, I really enjoy the power that these provide: https://kotlinlang.org/docs/reference/extensions.html https://kotlinlang.org/docs/reference/extensions.html What does Ceylon give me over Kotlin?
- gavinking 11y agoWell, if you read the linked article, a number of things are mentioned, including: - union and intersection types - an elegant and powerful representation of tuple and function types - reified generics - the cleanest solution to the problem of null - awesome modularity - a language module [that] completely abstracts the underlying runtime, and offers a set of elegant APIs that vastly improve on those available natively - a language specification None of which is offered by Kotlin. That's quite a lot, actually.
- aembleton 11y ago- union and intersection types -- I'll have to read up on this - an elegant and powerful representation of tuple and function types -- Okay, Kotlin could do with this - reified generics -- This is apparently expensive on the JVM: http://blog.jetbrains.com/kotlin/2014/12/m10-is-out/ http://blog.jetbrains.com/kotlin/2014/12/m10-is-out/ - the cleanest solution to the problem of null -- I think saying that `String? x = "abc"` is cleaner than `var b: String? = "abc"` is subjective. -- Does Ceylon have Safe Casts? https://kotlinlang.org/docs/reference/null-safety.html https://kotlinlang.org/docs/reference/null-safety.html - awesome modularity -- Something I'll need to look into - a language module [that] completely abstracts the underlying runtime, and offers a set of elegant APIs that vastly improve on those available natively -- I guess the improvement in abstraction comes from the Reified Generics -- Have you got any examples of where the API is superior to that of the Kotlin one? For example, with Kotlin's extension functions Java File object has been extended with a readLines() function that returns all of the lines of a File as a List. I was impressed when I saw that. Underneath it is doing the usual BufferedReader and InputStream boiler plate work that you would normally write in Java. - a language specification -- https://kotlinlang.org/docs/reference/ https://kotlinlang.org/docs/reference/
- randomThoughts9 11y agoI hope they'll redo some of the documentation with this upcoming release. Every time I read it, I am amazed by how comprehensive it is but still manages to miss some very important points. Like the fact that on the main page, the link to the online editor is not under the "Try it out" section. The explore action from that section is also misleading. Or a clean hello world, with a real project structure documented Or the way collections are documented. Basically, you have section 6 from the tour of ceylon: Streams, sequences and tuples. But it's not obvious what is the big difference between streams and sequences and the fact that sequences borrow the array notation while being immutable doesn't help either. Even when you go to the List api, which is the interface any Java developer will look for,you can't find the mutable collections, because they live in another module.
- gavinking 11y agoWould you please open an issue here with the things you would like changed: https://github.com/ceylon/ceylon-lang.org/issues https://github.com/ceylon/ceylon-lang.org/issues Thanks.
- NanoWar 11y agoI don't like the extensive use of the ` character, because it's really hard to use on a german keyboard: it get's added twice :( Other than that this looks great!
- ake1 11y agoyou might want to look into changing to another keyboard layout. as a swede, using altgr+[7-0] to get (curly)brackets is just ridiculously cumbersome compared to say a us layout.
- oldmanjay 11y agoPart of me fears the GWT successors that could end up built out of this. Part of me is intrigued by the excellent modularity story. Part of me is excited to try out the type system. Most of me wonders if I'll get time or an opportunity to explore. Overall, this generation of languages is pretty exciting!
- hcarvalhoalves 11y agoLooks like a smaller Scala that also compiles to JS. Might be worth a shot.
- trhway 11y agoi want it! it will increase my job security with features like this : == String name => firstName + " " + lastName; And an assignment: String name = firstName + " " + lastName; In the first example, the expression is recomputed every time name is evaluated. In the second example, the expression is computed once and the result assigned to name. == A function which looks like just a variable and recomputed each time! Happy debugging my code, suckers!
- findjashua 11y agoi've been using fat arrows for function definitions in es6, and haven't had a problem. I think the confusion in your code has more to do with poor code than fat arrows.
- Lazare 11y agoSpeaking as someone who has done quite a lot of work using languages with terse lambda syntax... ...that's just not ever an issue.
- sixbrx 11y agoi think the poster thinks that with the fat arrow definition, name becomes an implicitly called function wherever it is used. I wouldn't like that either. but, I dont know if thats really the case though (I dont know ceylon). I think that fat arrow line would just become a no op instead, creating a lambda and throwing it away immediately ("name" being the param name in the lambda and nothing more).
- vorg 11y agoScala and Kotlin are mentioned so many times in these comments about Ceylon (42 times and 66, respectively, as I write), but no mentions of dynamic languages Groovy, Jython, or JRuby. I guess that shows there still a clear distinction between languages built from the ground up for building systems, and languages originally built for scripting, build scripts, and testing.
- lmm 11y agoI don't think the distinction is the one you're making it. The original intentions of languages are accidents of history (Java was originally for set-top boxes), and the likes of Python and Ruby are perfectly legitimate languages. The best options on the JVM happen to be typed, but there are good untyped languages and bad typed languages, and parochial typed languages and general-purpose untyped languages too.
- lfnon-heretic 11y ago> Furthermore, implementation of a compiler backend for the Dart VM is already quite advanced ... Curious if this work is still fruitful, now that Google has abandoned its plans to integrate Dart VM into chrome. http://techcrunch.com/2015/03/25/google-will-not-integrate-its-dart-programming-language-into-chrome/ http://techcrunch.com/2015/03/25/google-will-not-integrate-i...
- lobo42 11y agoDid anybody checkout xtend-lang.org? It's for sure better in terms of Java-interoperability and IDE plugins (Eclipse and IntelliJ) And it even has macros!!