> In the specific case of initializers, my opinion here is the opposite in >> fact — I think assigning to ‘self’ should be permitted in all convenience >> initializers, even initializers defined directly classes, without the >> protocol extension trick. Also, we should lower this more efficiently than >> we do today, without creating a self ‘carcass’ that is allocated and >> immediately freed, to be replaced by the ‘real’ self. >> >> > I totally agree. And I think that is the least impact way on the language > specification. > > Oops, It seems I have to take back my words. With my "factory initializer" example:
let dog = Dog(type: "cat") type(of: dog) == Cat.self results "true".
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution