Do you have any examples here? I can't think of a time when I've had to hunt long to figure out where things are happening in Rails.
Couple things to add to the pros/cons:
> Developer friendly (Ruby has a number of syntax warts, e.g. elvis operator, null safe operator - just to start) syntax
I would love to see the elvis operator and the null safe operator in Ruby, but I'd also like to see blocks in Groovy.
An addition to the pros of Groovy:
Interacts extremely well with existing Java code. While you can call into Java from JRuby, it's no where near as clean to interoperate with Java in the same code base. In the past I've loved Groovy because I could use it very cleanly inside a codebase that had a lot of Java, e.g. use Groovy to write controllers or data munging code but use Java for most other things.
Groovy allows passing a closure to a method with signature (where p3 is a callable)
a(p1, p2, p3)
as a(some_val, some_val){ closure content }
Are Ruby's blocks more powerful?It's much easier to write unreadable Scala code than Groovy.
Based on the docs for elvis, it looks like
potentiallyFalsyValue ?: safeDefault
is exactly equivalent to potentially_falsy_value || safe_default
in RubyFurther, the null-safe operator seems to be the same as #try in Rails and overuse of either is probably a bit of a smell that you might be violating Tell Don't Ask
<Type 1 or Type2> ||(Type1 arg1, Type2 arg2)
but in how many other languages is this? boolean ||(arg1, arg2)
C, Java, Objective-C, C++, C#, PHP vs Ruby, Perl, JavascriptIf || is used more frequently as a logical operator returning true(1) or false(0) to test logical or (not to be used for assignment), why overload this operator?
Having a separate operator like ?: better shows the intention of the usage. It also resembles the ternary function which has similar functionality.
One instance of where this is handy is for
returning a 'sensible default' value if an
expression resolves to false or null
http://groovy.codehaus.org/Operators#Operators-ElvisOperator(?:)
"Interest in Grails/Groovy is diminishing" - I won't comment on trends but there is still a large, active user base and community
I won't list the benefits of Ruby/Rails over Groovy/Grails because I will assume the audience here is familiar with Ruby/Rails.
Specifically here are some benefits of Groovy over Ruby:
and Grails over Rails: When I need to decide between using Grails and Rails, it usually comes down to developer convenience vs performance. I am asking myself do I want to give up a lot of performance (with Grails) for a little more developer conveniences (with Rails)? Sometimes the answer is yes, sometimes no.