7 ms·
Have 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
by lmm 11y ago
Have 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