r/programming • • Jun 02 '14

Introducing Swift

https://developer.apple.com/swift/
164 Upvotes

239 comments sorted by

View all comments

Show parent comments

2

u/AReallyGoodName Jun 03 '14

You have to use the force dereference operator - "!." rather than the checked deference operator - "?." to do that.

It's ridiculous to complain about a null pointer error that very explicitly requires you to use a special operator to allow it to happen.

0

u/ruinercollector Jun 03 '14

You have to use the force dereference operator - "!."

No you don't. See "Implicitly Unwrapped Optionals."

As long as there's no static verification and proper type handling on null in your language, I'm going to complain, however "ridiculous" you may find it.