That Groovy Style Guide - SemicolonsWritten on November 2nd , 2017 by @10000TB
That Groovy Style Guide - Semicolons
- No semicolons
- it is more idiomatic to have no simicolons in Groovy
I would strongly recommend this syle because of two reasons as stated below.
First of all, Apache says
No semicolons in their Groovy style guide. As they pointed out,
it is more idiomatic to have no semicolons in yout Groovy code.
In fact, Groovy supports 99% of Java syntax, and it will work in most
cases if you copy a snippet of java and paste it into a Groovy context. However, it is not 100% supported, right?
Since java syntax is not 100% supported, lets not mess Groovy up with Java. In this case, lets abandon semicolons. Therefore, another weaker argument of not having semicolons in Groovy: Java syntax is not 100% supported, so use no semicolons to clearly declare what is written is pure Groovy.
As always, comment below if you have a different view, and lates and best style will be updated to this post.