, imho, , .
-, , "" . "" ( ) , , (, ). self.b init , b init:
class Sub1: Base1 {
let b: Int
init(b: Int) {
self.b = b
super.init()
}
}
, init b, , , .
-, , . , . , - :
...
convenience init(b: Int) {
self.b = b
self.init(c: 10)
}
convenience init(c: Int) {
self.c = c
if c == 7 {
self.b = 11
}
self.init()
}
, "" , b ?
, :
class Base1 {
init() {}
}
class Sub1: Base1 {
let b: Int
init(b: Int) {
self.b = b
super.init()
}
override convenience init() {
self.init(b: 7)
}
}
, , , , let b init?