[swift-evolution] [Review] SE-0099: Restructuring Condition Clauses
David Hart
david at hartbit.com
Mon Jun 6 02:26:57 CDT 2016
> • What is your evaluation of the proposal?
+1 I’ve always been annoyed by the complicated grammar of condition clauses. This proposal simplifies them and makes them easier to understand and teach.
Especially, I regret that the syntax for A && B is different than B && A when A is a boolean expression and B is an optional unwrapping clause. It breaks a nice visual symmetry:
if a, let b = b {}
if let b = b where a {}
This proposal brings back the symmetry.
> • Is the problem being addressed significant enough to warrant a change to Swift?
It is.
> • Does this proposal fit well with the feel and direction of Swift?
It brings more consistency, and it breaks the syntax. So it should be introduced for Swift 3.
> • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
I haven’t used languages which had anything else than boolean expressions in their condition clauses, but I’ve always expected the syntax of A && B to be symmetrical to B && A.
> • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
A long read of the original discussion and the review discussion.
>
> More information about the Swift evolution process is available at
>
> https://github.com/apple/swift-evolution/blob/master/process.md
>
> Thank you,
>
> -Joe
>
> Review Manager
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list