4 ms·
Your approach seems to be a completely wrong use of optionals (have you been writing in Java or any other language with implicit nullability?) since you’re givi
by dkarbayev 8y ago
Your approach seems to be a completely wrong use of optionals (have you been writing in Java or any other language with implicit nullability?) since you’re giving up type-safety of Swift. Do you use implicitly unwrapped optionals for delegates too?
- saagarjha 8y agoDelegates should be nil, so it totally makes sense to keep them as an optional. I don’t see this conflicting with the parent’s set of “rules”.
- aaaaaaaaaab 8y ago>since you’re giving up type-safety of Swift Giving up type-safety? Sorry, but I don't understand this in the current context. As for delegates: if the delegate can be 'nil' during normal operations, then it should be a regular optional as per rule #3.