The name of the !
always confuses me: it\'s called an \'implicitly unwrapped optional\'. However, what is implicit about it? Implicit means \"implied though not pla
Normal Optional
var foo : Foo? = Foo()
foo!.doSomething() // explicitly unwrap it and call the method
Implicitly Unwrapped Optional
var foo : Foo! = Foo()
foo.doSomething() // implicitly unwrap it and call the method just like it is not optional
In both case, you need something to declare an optional (?
or !
). Implicitly Unwrapped Optional does not add more. But you can omit unwrap operator when use it.