News for hackers. Stuff that matters.
Re:Ask HN: If learning to develop for iOS- start with Obj C ... by mpweiher on Monday June 16, 2014 @04:05AM (#7897860)
Well, they're not mapping them to optionals, but to "forced unwrapped". This is how the superview property of NSView is declared:

    var superview: NSView! { get }

In a workspace:

   var view = NSView( frame: NSRect(x: 10, y: 10, width: 300, height: 100))   -> NSView 

   view.superview  -> nil
So now I have a nil in Swift that is not wrapped in an optional. No compiler warnings, boom! And of course, no way to catch exceptions, so BOOM!

There are no comments on this comment yet.