4 ms·
I've also used both languages a fair bit, but I've never used Grails (although I've played with it). Couple things to add to the pros/cons: > Developer friend
by mbell 12y ago
I've also used both languages a fair bit, but I've never used Grails (although I've played with it).
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.
- sytse 12y agoIsn't the elvis operator || in ruby? see http://stackoverflow.com/a/7816041/613240 http://stackoverflow.com/a/7816041/613240
- bjfish 12y agoYes, but I think that syntax is a little ugly, see https://news.ycombinator.com/item?id=8916893 https://news.ycombinator.com/item?id=8916893
- _pmf_ 12y ago> but I'd also like to see blocks in Groovy 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?