Link Details

Link 282607 thumbnail
User 185351 avatar

By jsugrue
via groovy.dzone.com
Published: Nov 08 2009 / 18:06

Like Javascript, semicolons are optional in Groovy except for when they aren't optional. These examples are both pretty contrived, though I found both because they're actually something that I've written, and could both be written better. That's not really the point I'm making though. When something doesn't compile when it looks like it clearly should sometimes it's hard to track down why, and it's surprising to learn that it's because you need a semicolon.
  • 15
  • 1
  • 910
  • 211

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.