Welcome to "Groovy Regular Expressions - The Definitive Guide"! In the next 15 minutes, you are going to learn everything you need to start working productively with regular expressions in Groovy programming language. Let’s get started!
Groovy programming language tutorials and howtos.
Most of the object-oriented programmers prefer constructing algorithms using imperative style over using recursion. ...
GraalVM became one of the most popular topics in the JVM ecosystem. It promises the highest possible speed of runnin...
What is the most popular Groovy library, framework, or a tool? I surveyed 308 Groovy community members, and here are...
GraalVM became one of the most popular topics in the JVM ecosystem. It promises the highest possible speed of running JVM-based programs (when compiled to native images), hand in hand with the smaller memory footprint. It sounds interesting enough to give it a try. And today we are going to play around a little bit with running simple Groovy program after compiling to a standalone native image.
I guess you may heard about Groovy’s
Collection.each(Closure cl) method - it was introduced 15 years ago  and it was a great alternative for a good old for-loop, for-each or even using an iterator approach. You may also heard, that you should not overuse it, because creating a closure to do such simple operation like collection iteration is an overhead. But what if I tell you that nothing could be further from the truth - Groovy’s
each method may be faster than iterator or Java’s for-each. Sounds interesting? Enjoy the reading!
One of the first mistakes people do when starting their journey with Java programming language is using
== to compare objects instead calling
a.equals(b). When you begin playing around with Groovy you quickly notice that equal operator
== is used to compare objects in place of calling
a.equals(b). "Finally something more intuitive!" you might think. In today’s article we will dig a little bit deeper to learn avoiding problems equal operator in Groovy may produce.
Some time ago I have found another interesting Groovy related question on Stack Overflow. This time someone was asking about static variants of popular
methodMissing methods. The official Groovy documentation does not explain how to do it - it only explains how to add any static method through
metaClass. Today we are going to learn how to define these methods in two different ways.
Groovy is a very powerful language on a JVM platform and with this great power comes great responsibility. There are many language features that are not intuitive for many people that start using Groovy. One of these features is dynamic coercion and type promotion which may cause you a headache if you use it carelessly.
If you use Groovy for scripting or other similar tasks you probably faced a situation where you get an input as a text and you need to process it e.g. split by some delimiter and continue working with extracted values. In this post I will show you how to do it in 3 different ways.
Recently I have answered a few questions on Stack Overflow related to Groovy scripts and how they work in combination with closures and delegated objects. Some of use cases may not be intuitive and today I’m gonna show you one of them and explain what happens under the hood.