Let's muse about the semantics of the new func finish(_ hasFailed: Bool)
call of v2.0 of Queuer
#12
Labels
func finish(_ hasFailed: Bool)
call of v2.0 of Queuer
#12
I really love simplicity of this framework and the way it is heading. However, I'm not entirely sure I like the semantics of the new
func finish(_ hasFailed: Bool)
call of version 2.0 ofQueuer
.At the call side a successful finish of an operation now looks like this:
Since the parameter name is not exposed, my mind reads "operation not finished". If I'm the only person seeing a potential pitfall here, please close the issue and let's forget about it. Otherwise, I suggest to either exposed the parameter name to make obvious what is happening:
Or, what I think would be a more natural approach, change the semantics to
func finish(success: Bool)
:Or maybe event to
func finish(success: Bool = true)
:I think the last option could have some benefits:
operation.finish()
operation.finish(success: false)
The text was updated successfully, but these errors were encountered: