>>100184186The conditions for one don't align because the first one takes only “if” not “else if” but because there's space under it in this case it's just less clear. Like seriously, what's easier to read:
let comparison = if n > 0 {
Positive
} else if n == 0 {
Zero
} else if n > 0 {
Negative
};
let comparison = cond {
n > 0 => Positive,
n == 0 => Zero,
n < 0 => Negative,
It's a simple contrived example with not much going on, but it shows clearly which one looks more immediately obvious to read. This only gets worse with more arms to test for and more complex branches and conditions.
Lisps have a cond clause like that, and pretty much no one uses the “if/else if” which also exit for anything but a simple terniary operator like syntax on one line where cond is indeed too verbose.