[swift-evolution] [Discussion]: Deprecate !-Unwrapping of Optionals
pierremonodbroca at gmail.com
Tue Mar 1 00:43:15 CST 2016
And it's still better than the iconic NullPointerException, because it will mostly happen sooner, making it easier to understand
> Le 1 mars 2016 à 06:58, Chris Lattner via swift-evolution <swift-evolution at swift.org> a écrit :
>> On Feb 29, 2016, at 4:04 PM, Developer via swift-evolution <swift-evolution at swift.org> wrote:
>> It is guarded in the same way that *(NULL) is guarded by an EXC_BAD_ACCESS. It is all partiality in the end and beside the point I wished to make at the root of the discussion.
> Random ultra pedantic point, but dereferencing a null pointer in C (or an nil UnsafePointer in Swift) is actually undefined behavior, it is not guarded by a deterministic trap (as it is in Java).
> Details here:
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution