is doing ``` when (boolean) { true -> ... ...
# announcements
t
is doing
Copy code
when (boolean) {
    true -> ...
    false -> ... 
}
considered bad?
e
why not
if(boolean) … else …
t
well, that's what i've been doing most my life, but this looks very neat and explicit
m
I think
when
is better suited for multiple (>2) branches
otherwise,
if
is more familiar
h
"Prefer using if for binary conditions instead of when." https://github.com/yole/kotlin-style-guide/issues/11
t
@horse_badorties thanks, good read