How can I force calls to some constructors/functions to use named arguments?
In Kotlin 1.0 you can do this by using Nothing from the stdlib. In Kotlin 1.1+ you will get “Forbidden vararg parameter type: Nothing” but you can replicate this pattern by defining your own empty class with a private constructor (like Nothing), and using that as the first varargs parameter. /* requires passing all arguments … Read more