by eloisant · 13y ago · 0 comments
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).
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.
As you are probably aware, this is a highly controversial claim and there is certainly no widespread agreement on it.
There's a project out there somewhere for integrating Groovy with Play but it looks quite immature.
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-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.
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.
Look at the key differentiator of each language when it was first created. So,
If you really need the JVM...
* Groovy for quick-to-write dynamically-typed scripts for testing Java classes
* JRuby if you need Java 7 and invoke-dynamic
* Scala if you need static compilation
* Clojure if concurrency is important
Of course, if you need specific software, choose Groovy for Grails, Scala for Lift, Clojure for Leinengen, etc.
If you don't need the JVM, consider Ruby, Python, Javascript, etc.
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.
https://github.com/robfig/revel
It didn't feel like idiomatic Go to me, but was a very nice, featureful, and complete framework.
One thing that comes to mind is ACID compliance. Any other pluses of using sql over an ORM would be appreciated. I have a friend who swears by it, who taught another friend that is now swearing by it.
When you use "sbt ~run", sbt compiles each file as soon as it changes. I.e., as soon as you save out the editor buffer. By the time you click on the reload button, sbt has usually already compiled all your changes, and it only takes a second or two for either your working page to reload, or for you to see a compiler error message.