[swift-evolution] [Accepted with Revision] SE-0099 Restructuring Condition Clauses

David Hart david at hartbit.com
Thu Jun 9 03:21:09 CDT 2016


The clarification seems pretty clear to me, and they stated it:

"to preserve higher-level consistency throughout the language in how components of expressions and statements are separated"

> On 09 Jun 2016, at 09:53, Haravikk via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> On 9 Jun 2016, at 02:47, Joe Groff via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> comma should remain the condition separator, and the 'where' keyword can be retired from its purpose as a boolean condition introducer.
> 
> Can we get some clarification as to why ‘where’ is being chosen to be retired here? I’m deeply disappointed by that decision as enabling the consistent use of comma as a separator does not preclude the use of where for simple cases that don’t require it. I’m all for having a more usable separator for complex conditionals, but I rarely need it, meanwhile in common, simple conditional bindings and patterns I find the ‘where’ keyword a lot more readable, i.e:
> 
> 	if let value = foo where foo > 5 { … }
> 	if let value = foo, foo > 5 { … }
> 
> The latter just doesn’t read as cleanly to me, and these are the kinds of simple conditionals that I use a lot of. As such as I’d still prefer to have ‘where’ be usable in the simple case, and I feel it was a mistake for the SE-0099 to have it tied to changes to the separator as the two changes aren’t mutually exclusive.
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160609/a3efe2e1/attachment.html>


More information about the swift-evolution mailing list