> On Jan 30, 2017, at 12:36 PM, Robert Widmann via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> This seems to contradict Swift’s goal of being safe by default, no?  It would 
> make me incredibly uncomfortable if there were a backdoor in DI, even if that 
> backdoor emitted traps when it fails.

There already is a backdoor of sorts. This is one of the intended use cases for 
implicitly-unwrapped optionals. If you don't want to be hassled by DI, declare 
a property as T! type, and it will be implicitly initialized to nil, and trap 
if you try to use it as an unwrapped T without initializing it first.

-Joe
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to