> On Jun 23, 2016, at 6:07 PM, Pranjal Satija via swift-evolution 
> <[email protected]> wrote:
> 
> Would modifying array subscripts to return implicitly unwrapped optionals be 
> a bad idea? This way, if an array is indexed out of bounds,

Most out of bounds errors originate in bad code. So now instead of forcing 
people to rewrite it or at least have more bad code to be more defensive, this 
would give an incentive to ignore the original problem and never learn to code 
properly.

> the returned value will be nil, instead of a fatal error. This would allow 
> developers to check for nil before fatal errors are created.
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to