[swift-evolution] [Review] SE-0105: Removing Where Clauses from For-In Loops

Erica Sadun erica at ericasadun.com
Fri Jun 24 13:03:33 CDT 2016


> On Jun 24, 2016, at 11:26 AM, Karl Wagner via swift-evolution <swift-evolution at swift.org> wrote:
> 
> -1
> 
> I've followed this discussion since the beginning, and I feel the usage is clear given that for...in is a *data-driven* loop
> 
> I wouldn't mind renaming to "if" if there is some confusion, but I think we use "where" consistently in the language (and Dave Abrahams proposal for closure argument names takes this further), so could be argued that it's already clear.
> 
> Perhaps we should use "where" consistently for data-filtering operations, and possibly rename the generic constraint specifier. If we wanted to be really rigorously consistent.
> 
> Karl

I'd much rather keep `where` for protocol constraints and rename data-filtering in for-in if kept. My suggestions in the proposal are "if", "unless", "until", and "while". 

-- E



More information about the swift-evolution mailing list