8 ms·
> This is mostly due to the Scala compiler being a bit slow. True. Reloading pages on Play 1 (Java) took less than a second. It's about ten seconds now on Play
by laureny 14y ago
> This is mostly due to the Scala compiler being a bit slow.
True. Reloading pages on Play 1 (Java) took less than a second. It's about ten seconds now on Play 2 because of Scala.
The move to Scala feels like a mixed bag to me: it added both features and bloat to Play. Play 1 feels so light and fast in comparison.
It seems to me the Play developers moved to Scala more for personal fun than for their users (nothing wrong with that, just making an observation).
- zmmmmm 14y agoI wish they had gone with Groovy. Groovy 2.x offers pretty much all the benefits of static compilation and dynamic language features together, it compiles on the fly instantly (being at its heart a dynamic language), and has meta programming features (intercepting it's own compilation and changing the AST, etc.) that would rival Scala's. There's a project out there somewhere for integrating Groovy with Play but it looks quite immature.
- vorg 14y ago> I wish they had gone with Groovy. Play 2 stripped out all the Groovy code from Play 1. There must be a reason. > Groovy 2.x offers pretty much all the benefits of static compilation and dynamic language features together Groovy's dynamic compilation is reliable, but sloooooooooow. The static compilation added in Groovy 2 is much faster but still buggy e.g. http://stackoverflow.com/questions/14774709/groovy-2-1-0-weird-behaviour-of-switch-case-break-statement-with-compilestatic http://stackoverflow.com/questions/14774709/groovy-2-1-0-wei... It was written by one developer, and first shipped in Grails only 2 months ago. And does Grails actually use any of Groovy's static compilation features? I haven't seen anywhere it's used: point me to somewhere in the Grails codebase if it does. You don't get all the benefits of static compilation and dynamic compilation together, you can get bugfree (but sloooooooooow) code, or faster (but buggy) code.
- zmmmmm 14y ago> Groovy's dynamic compilation is reliable, but sloooooooooow. I guess you mean execution speed, not compilation? Compilation is fast enough I think. Execution certainly compares fine with other dynamic languages, at least, in my usage (and for some things it is much faster). > The static compilation added in Groovy 2 is much faster but still buggy The bug you mention is certainly bad, but it was addressed extremely quickly. Are there other examples? > It was written by one developer, and first shipped in Grails only 2 months ago A little misleading - static compilation has been in core Groovy for 9 months or so and is now supported by the core groovy team. > And does Grails actually use any of Groovy's static compilation features? I don't know, but it's not really relevant. I'm not advocating for Grails here, I'm advocating use of Groovy with Play. Part of the reason I want that is that I'm not extremely fond of Grails for various reasons.
- nnq 14y agoWhen Groovy's author said he prefers Scala (http://macstrac.blogspot.ro/2009/04/scala-as-long-term-replacement-for.html http://macstrac.blogspot.ro/2009/04/scala-as-long-term-repla...) it pretty much sealed the language's fate... though, in all seriousness, there really is too much language diversity on the JVM (how tf would one choose between Groovy, JRuby or JPython? - yeah, you choose the framework not the language, but still, it means that all the good developers are split working on different projects).
- don_draper 14y agoThat statement is misleading. James Strachan left Groovy a long time ago. Guillaume Laforge has lead the project from almost death to one of the most popular languages in use today.
- vorg 14y agoMost of the technical work has been done by Jochen Theodorou. Others who have helped technically are Paul King, Cedric Champeau, Alex Tkachman, and Jeremy Rayner. James Strachan also did a lot of technical work on Groovy in his day. I'd rather listen to what someone who's done technical work has to say than someone who shows powerpoint slides. You mentioned Guillaume Laforge as leading the Groovy project, but from my experience, Graeme Rocher, the Grails Project Manager, seems to have far more say over Groovy's direction. As for calling Groovy "one of the most popular languages in use today", it figures fairly low in most popularity ratings (e.g. not in Tiobe's top 50), and only shows the occasional burst when it's been actively talked up, e.g. just before a conference when the project managers are selling conference seats.
- zmmmmm 14y agoThat piece is very dated, and your comment is misleading. He didn't consider Groovy as a replacement for Java at the time because it was not statically typed and did not compile to fast byte code. In fact, if you read through all the reasons he recommends Scala, every one of them has been addressed in Groovy in the last few years.
- 14y ago
- nessus42 14y ago> It seems to me the Play developers moved to Scala more for personal fun than for their users (nothing wrong with that, just making an observation). Maybe they moved to Scala because Scala is a superior language. And where I work, we are users of Play specifically because it supports Scala well.
- laureny 14y ago> Maybe they moved to Scala because Scala is a superior language. As you are probably aware, this is a highly controversial claim and there is certainly no widespread agreement on it.
- jbrechtel 14y agoThat doesn't make it false.
- laureny 14y agoSaying that Scala is a superior language is like saying that the red color is superior to blue. It's not false, it's just silly.
- happy_dino 14y agoI really can't imagine how that is supposed to be even remotely controversial. That's probably as controversial as saying that a $200-CPU built in 2013 is faster than a CPU in 1993. Isn't that just repeating the “all languages are equal”-myth?
- seanmcdirmid 14y agoIts not controversial. Since "superior" is a superlative, it doesn't actually mean anything. So what you said is true but meaningless. Its just a matter of English, not ideology.
- 14y ago
- trailfox 14y agoWe're using it because it's Scala-centric as we use that a lot, pretty much migrating from Java to Scala for new systems.