[swift-evolution] [swift-evolution-announce] [Review] SE-0099: Restructuring Condition Clauses
laurent.mihalkovic at gmail.com
Mon May 30 20:49:58 CDT 2016
On May 31, 2016, at 12:54 AM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>> Thanks everyone. FYI, Erica and I discussed it offlist and agreed to amend the proposal: now you can use semicolons or a newline to separate clauses of different types.
> This change does not alter my concern about the overloading of the semicolon as a statement separator, and in fact, it introduces new ones about code formatting. Putting newlines in the middle of a compound conditional has always led to awkward questions about how deeply you should indent the conditions, the curly bracket or `else` keyword, and the contents of the block. Syntactically encouraging *every* compound conditional to use newlines, as you propose, only makes this issue worse.
> I continue to believe that, however complicated it may be for the compiler, the right answer is to use `&&`,
-1 visual clutter
> which expresses the desired semantic. Barring that, I prefer the current situation, messy as it may be, to this proposal. I simply cannot support overloading something as fundamental to the language as its statement separators (`;` and newline), even if the compiler can tell the difference. It was a mistake in the C-style for loop and it would be a mistake here as well.
> Brent Royal-Gordon
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution