[swift-evolution] [Pitch] Retiring `where` from for-in loops

Haravikk swift-evolution at haravikk.me
Tue Jun 14 03:22:41 CDT 2016


> On 14 Jun 2016, at 07:54, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
> 
> And a language feature being undocumented wouldn't explain why the entire stdlib uses it only three times :)

I sometimes wonder whether the stdlib is always the best example of pure Swift coding practices, it has after all been developed while the language itself is in flux so chunks of it were being written while language features were actively changing, and it has a lot of patterns in it that I just don’t use in Swift. For example, I still haven’t figured out why the Indexable protocol has an IndexableBase parent (other than to make figuring out why my types don’t conform a lot harder), and there’s stuff going on in .gyb files that remains a mystery to me. There’s also a lot of little hidden features that we don’t have access to in our own code (I can't find a method that retrieves object identifiers, for comparing two types without knowing what they are, outside of the stdlib for example, yet you’ll find them used inside AnyIndex and similar types).


More information about the swift-evolution mailing list