First of all, I tried to change the original proposal to add actual
@autounwrapped attribute to Swift.
Because "explicit is better than implicit" and consistency and so on.

Its authors did not pay much attention, and so I'm going to create a
separate proposal for that purpose.

Next, implicitly unwrapped optional was designed purely for bridging to
Objective-C (and now C).
Notation T! that is still used in Swift code, is misleading, because it's
not an actual type.

So I also propose that T! notation is reserved for entities imported from
Objective-C.
Swift code, which needs that behaviour, such as delayed initialization,
will use @autounwrapped.
It's more clear and explicit about this being a property behaviour and not
a type, with all consequences.

What do you think?

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

Reply via email to