The as! Operator
Thursday, 19 February 2015
Some changes in swift 1.2 for how conversions happen, the very golden rule is left at the end:
It may be easiest to remember the pattern for these operators in Swift as: ! implies “this might trap,” while ? indicates “this might be nil.”
These!
and?
can be confusing, specially coming from Objective C where sending a message to nil didn’t error out.
Are programming languages like jokes? If you have to explain them then…