Ben Keil04/18/2023, 3:27 PM
. it’s a little bit annoying to implement new fields twice. the only difference is that the one function has an optional name parameter and the other one not. if we would just remove the function without the param, it would collide with kotlin’s native
method. one solution would be to switch the order of the params. from
public fun run( name: String? = null, command: String,
but it will break some implementations (you see it probably first when the pipeline runs) beside that, would it be a good idea to force people to use named parameter, like we do in actions? this would make extensions in the future also easier.
public fun run( command: String, name: String? = null,
Piotr Krzemiński04/18/2023, 6:50 PM
Nikky04/18/2023, 7:54 PM
Piotr Krzemiński04/18/2023, 7:56 PM
people could still call it by order of arguments without specifying names..
What do you mean? There's a way to enforce using only named arguments