Re: [swift-users] Why does Array subscript fail at runtime?

2016-07-21 Thread H. Kofi Gumbs via swift-users
Thanks to everyone who responded! Particularly Jose who provided links to the Swift evolution discussion, one of which is still open, though deferred from Swift 3. I'm adding some thoughts to individual contents below, but my original question was answered. Jeff, that makes sense after looking mor

[swift-users] Why does Array subscript fail at runtime?

2016-07-20 Thread H. Kofi Gumbs via swift-users
Hello Swift community, Here's a philosophy I've struggled with since I started learning Swift. In general, it seems that failable function calls return `Optional`s; however, `Array`s violate this rule by failing fast at runtime. I understand that subscripts can't throw, so the only way to fail fas