Suppose I have something like: `class Client(host:...
# announcements
x
Suppose I have something like:
class Client(host: String = "localhost", port: Int = 50551, enableTls: Boolean = false)
. Now I would like to call the
constructor
with a different
port
, like:
val client = HelloWorldClient(443)
. Is there anything like a "wildcard" or something I can use that fills up the missing parameter? Something like
val client = HelloWorldClient(_, 443)
...
a
you can use named params like
Client(port = 443)
👏 3
x
Damn! Didn't know about that one! Thanks!
a
glad to help another kotliner