Roque Sosa
10/11/2022, 6:25 PMCasey Brooks
10/11/2022, 6:34 PMManuel Bogner
10/11/2022, 8:39 PMStephan Schroeder
10/12/2022, 7:03 AMval
over var
and immutable collection interfaces where ever possible. Add here and there an extension function and if you have a function taking a lambda try to make it inline
. Use `data class`es for your DTOs and get used to collection processing (a skill that is super transferable to stream processing in Java) and your code should be pretty decent Kotlin.
Concepts like data classes, sealed classes/interfaces and a switch expression have made it into Java right now. (ok, technically speaking the aims of records and data classes are not quite the same, but since I mostly use data classes with all val
properties they are quite the same in (my) practice.)
(As long as your not working with a reactive codebase you can set aside coroutines. Those take a bit longer, but so does learning reactive programming in Java.)
I've worked with Java devs coming to Kotlin projects in the past and treating Kotlin as Java with inbuild Lombok + nullability is a perfectly fine first step!AndreyVanDenHaag
10/12/2022, 8:39 AMRoque Sosa
10/12/2022, 12:40 PMJack Bolles
10/24/2022, 11:34 AM