Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 10: You need to do many things at once.
Mostly waiting. Sometimes working.
Continue reading →
Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 9:
You need something that belongs to the class.
Not to an instance.
Continue reading →
Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 8:
You want a sensible default.
If something is missing.
Or null.
Or both.
Continue reading →
Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Ignoring them doesn’t make them go away.
Continue reading →
Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 6:
Passing functions around sounds scary.
Continue reading →
Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 5:
Java has switch.
Kotlin has when.
Continue reading →
Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 4:
Copying objects should be easy.
Continue reading →
Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 3:
Constructors are supposed to be simple.
Java sometimes seems to disagree.
Continue reading →
Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 2:
You need a simple object.
Just data.
No behavior.
No clever tricks.
And yet, Java somehow turns this into a small project.
Continue reading →
Considering a move to Kotlin? Coming from a Java background?
In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin.
While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 1:
You are working on an application in Java and you need a reusable way to modify a String.
Nothing fancy.
No frameworks.
Just a small helper.
Continue reading →