This is difficult to explain, so here's an example:
fun foo() = with(bar) {
baz()
baz()
}
// turns into
fun foo() =
with(bar) {
baz()
baz()
}
It's not atrocious, by any means, but it's annoying since with(bar) is not that large of a cognitive load that one must have it on a separate line.
Btw, this similar example stays the same:
fun foo() = withBar {
baz()
baz()
}
I probably wouldn't want something like this to stay:
fun foo() = with(someBarCalculation(fooooo, barrrr, bazzzz, otherArgs, someCalculationEven())) {
baz()
baz()
}
but I could see an argument that it should (as long as it's within the max width)
This is difficult to explain, so here's an example:
It's not atrocious, by any means, but it's annoying since
with(bar)is not that large of a cognitive load that one must have it on a separate line.Btw, this similar example stays the same:
I probably wouldn't want something like this to stay:
but I could see an argument that it should (as long as it's within the max width)