silver laptop computer on table
Photo by Dawid Liberadzki on Unsplash

Let’s assume that you want to find the difference between 2 numbers. As you probably remember from school, the difference is not commutative, meaning that:

a — b != b -a

However, we may forget the ordering of the parameters which can cause “trivial” mistakes and plenty of headaches:

To avoid such potential mistakes, we can simply use named parameters, and the ordering of parameters that we use when we call methods doesn’t matter anymore:


It does not seem that much of a big deal, but it can save you from potential bugs and also many hours spent debugging.

I hope you find it useful.