The language basics

Five lessons cover what every later lesson assumes: a variable with def and a variable with a type, the five kinds of string and the interpolation of a GString, why 0.1 + 0.2 is exact here, the operators that have no Java spelling, and the small rules (truthiness, imports, comments) that make a script read the way it does.

008 def and static types dynamic variables, declared types, and when each one is the right choice Open 009 Strings and GStrings single, double, triple and slashy strings, interpolation, and the GString trap Open 010 Numbers and BigDecimal why 0.1 + 0.2 is exact here, integer division, and the suffixes of a literal Open 011 Operators safe navigation, Elvis, spread, ranges, the spaceship and the rest of the shorthand Open 012 Truthiness, imports and comments what counts as false, the imports Groovy adds, and the comments a script takes Open

Lessons