Help with history: line break before control flow keywords - changed?

It seems clear to me (now) that the default for swift-format, Swift Standard Library and Apple example code is to have no line break before control flow keyword. In other words this is the recommended:

if condition {
    // do something
} else {
    // do something
}

I am very sure that I got the impression, long time ago, that the Apple way was in fact to have a line break before. Like this:

if condition {
    // do something
}
else {
    // do something
}

So my question is: Am I going mad (please don’t answer that part) or was this a previous default and recommended style from Apple?

1 Like

There's been some organic drift in idiomatic usage which is reflected in swift-format defaults. We also used to put a space on both sides of the conformance colon: struct S : P...

2 Likes