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. …