3 ms·
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! {
by mpweiher 12y ago
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!