The Ghost of Swift Bugs Future
Update: I wrote this with Xcode 7 β1, and playgrounds crashed a lot at the time. As a result, I gave up on testing all the cases, and a lot of errors creeped into the snippets. They are now corrected, thanks to (among others) @CalQL8ed_K_OS and @IanKay, who both corrected me and shamed me into fixing things. Thanks guys!
So Swift 2 is out, and they fixed enums with variable payloads, so the party is on.
I haven’t had a chance to play with it too much, but watching the [Protocol-Oriented Programming in Swift][pop] session, a particular construct struck me as the most likely source of arcane, incomprehensible bugs in the future. I expect it to be the novice’s crucible, similar to the way deallocated delegates would lead to crashes in the days before the weak
attribute was introduced. I’m not yet sure what the searches will look like, but the fundamental question will be a variation of:
...