loading...

re: Builder pattern in Kotlin VIEW POST

FULL DISCUSSION
 

Well you don't need this
The builder pattern is integrated in Kotlin in the language itself.
Define a normal data class with immutable properties, that's it, you have exactly what you needed in Java when you needed a builder class.
The only case for using the actual Java builder pattern is if you release a Kotlin library and want to provide this feature to Java programmers.

code of conduct - report abuse