> On Feb 22, 2017, at 5:32 PM, Ben Cohen via swift-evolution > <[email protected]> wrote: > >> On Feb 22, 2017, at 10:42 AM, Nate Cook via swift-evolution >> <[email protected] <mailto:[email protected]>> wrote: >> >> Oops, left out that there's this horrifying way of writing it right now: >> <snip> >> Nobody wants that. >> > > Oh I don’t think it’s all that bad! It also doesn’t need to be an IUO, since > you’re unwrapping it immediately into another variable no matter what.
One big issue is that can cause erroneous usage to propagate: // want to index to the first character after the paren str.index(str.index(of: “(“), offsetBy: 1) before this sort of code would give an error saying that the case where “(“ was not found wasn’t handled, but now it will silently give unexpected behavior. -DW
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
