SE-0380: `if` and `switch` expressions

I see. I tend to think this was a mistake to choose the same syntax for closures and if/etc body blocks:

func foo() -> Bool {
    if foo {
        return true // returns from "foo"
    }
    ...
}

func foo() -> Bool {
    items.filter { item in
        return true // does not return from "foo"
    }
    ...
}
2 Likes