at the moment some methods are duplicates, e.g. `J...
# github-workflows-kt
b
at the moment some methods are duplicates, e.g.
JobBuilder.run()
. 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
run
method. one solution would be to switch the order of the params. from
Copy code
public fun run(
        name: String? = null,
        command: String,
to
Copy code
public fun run(
        command: String,
        name: String? = null,
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.
p
I'm fine with making the breaking change resulting from removing one overload and switching order of the first two args. Regarding enforcing named arguments, I need to think about it for a sec - probably makes sense, but would be happy to know opinion of some users
n
can we even do that ? i mean… people could still call it by order of arguments without specifying names.. it would just be unreadable and tedious…
p
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
Someone may argue that not using named arguments is unreadable :)
E. g. in my company we write in Python and we have an internal code style where we must use named arguments