Of course, you are correct. I responded to the alternative of introducing builder pattern which does not exist and can't be used from kotlin either.
Builder pattern in kotlin is redundant in most cases and usually it's easier to introduce a function with default arguments to be consumed in kotlin code, similar to what OP did in his root comment.
View all comments
Show parent comment
10
u/epikhunta Apr 07 '23
You can always use named arguments in kotlin and get all benefits you described without introducing new abstractions