3 ms·
var someInt: Int! // class parameter // later, in a method let url = "/api/bla/\(someInt)" In Swift 2.x it would simply show the value of someInt. Now
by dep_b 10y ago
var someInt: Int! // class parameter
// later, in a method
let url = "/api/bla/\(someInt)"
In Swift 2.x it would simply show the value of someInt. Now it will print Optional. The problem is described in the linked Stack Overflow question as well.
I never program like that but there's a ton of people out there that convince the compiler they're going to set that value in time even when it's not set when init is called. Just like some people (including Apple!) use this pattern for setting outlets:
IBOutlet var someLabel: UILabel!