Differences from Ruby

The core abstract programming model of Ruby and Groovy are very =
similar: everything is an object, there is a MOP in control of all activity=
, and closures are the core structuring tool after classes. Ruby uses the R=
uby library, Groovy uses the Java library with some additions of its own. T=
his is the biggest difference but it is a huge difference. Syntactically, t=
hings like:

=20

=20

File.open( 'blah' ) { | file | puts( file.read ) }

=20

=20

becomes:

=20

=20

println ( new File ( 'blah' ).text )

=20

=20

which doesn't show that the Groovy closures syntax is:

=20

=20

{ file -> doSomething ( file ) }

=20

=20

which is slightly different from Ruby, but does show that sometimes Groo=
vy has a different approach to certain things compared to Ruby. So in movin=
g from Ruby to Groovy, there are gotchas.