> On Jun 28, 2017, at 14:40, Erica Sadun via swift-evolution 
> <[email protected]> wrote:
> 
> The `!!` operator should follow the same semantics as 
> `Optional.unsafelyUnwrapped`, which establishes a precedent for this approach:
> 
> > "The unsafelyUnwrapped property provides the same value as the forced 
> > unwrap operator (postfix !). However, in optimized builds (-O), no check is 
> > performed to ensure that the current instance actually has a value. 
> > Accessing this property in the case of a nil value is a serious programming 
> > error and could lead to undefined behavior or a runtime error."

Note that 'unsafelyUnwrapped' does not perform the check in optimized builds 
(like 'assert'), while '!' does (like 'precondition'). If we go with '!!', it 
should behave like 'precondition', not 'assert'.

Jordan
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to