> On Dec 3, 2017, at 12:54 PM, Thorsten Seitz via swift-evolution
> <[email protected]> wrote:
>
> The difference is that IUOs are marked by a "!“ whereas dynamic member
> lookups look just like normal member lookups but unlike them can fail.
We don't even need to bring up IUOs for it to be possible to write code that
can fail without visibility at the call site. A contrived example:
func convertToInt(_ val: String) -> Int {
return Int(val)!
}
let val = "something"
// ... a bunch of code
let i = convertToInt(val) // Fatal error: Unexpectedly found nil while
unwrapping an Optional value
This is trivially easy to do, and has been since Swift 1, but it's not
something that has become a widespread issue.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution