Functional Programming Java vs. Kotlin, Stateful Function Edition

Java vs. Kotlin, Stateful Function Edition

State encapsulation or lamba expression with closure when implementing stateful functions? Is Java or Kotlin better suited for either one of those 2 approaches? Let’s find out… Use case To compare implementations in Kotlin and Java, we will build a very simple feature, create a function that can count how many times it was called. …

Read Article Read More

Functional Programming Extension Function vs. Regular Function in Kotlin

Extension Function vs. Regular Function in Kotlin

I’m a big fan of extension functions in Kotlin, for me it’s another tool in our toolbox to give the developer additional options as an API designer or consumer, but this post is not about the philosophical discussion of the merits of extension functions, like the ability to chain utility functions vs. the issues that …

Read Article Read More