News for hackers. Stuff that matters.
Re:Is Apple Using Swift? by rockshassa on Monday January 18, 2016 @02:41PM (#10926411)
yes, it is a runtime error. given the code

let foo = bar!

If bar is nil, you'll get a runtime error "unexpectedly found nil when unwrapping bar"

in my opinion, the benefit of optionals in general is that it allows you to guarantee at compile time that certain variables (non optionals) will _never_ be nil, which enables all kinds of compiler optimizations.

There are no comments on this comment yet.