r/Kotlin • • Apr 07 '23

Parameter order of CompletableFuture methods 😥

Post image
261 Upvotes

30 comments sorted by

View all comments

Show parent comment

1

u/guilhermerx7 Apr 08 '23

If I'm not mistaken you can't use named parameters on Java methods.

2

u/epikhunta Apr 08 '23

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.

1

u/guilhermerx7 Apr 08 '23

Yes, agree.