Hacker News new | past | comments | ask | show | jobs | submit login

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.




Isn't the elvis operator || in ruby? see http://stackoverflow.com/a/7816041/613240


Yes, but I think that syntax is a little ugly, see https://news.ycombinator.com/item?id=8916893


> 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?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: