In fact, you do not put too much business. Definition:
class Human {}
class Child: Human {}
struct Holder<T> {}
I made Holder a structure, so no one can blame us for deceiving: Array is a structure, Holder is a structure. And I removed your restriction on the placeholder, reducing everything to the maximum possible shape.
Child, Human:
var arr = Array<Human>()
arr = Array<Child>()
Fine. Holder:
var holder = Holder<Human>()
holder = Holder<Child>()
parallelism : Array - , Holder - , , , . , ?
, , , , , Apple. Apple , Array , . , . , , , .
, Apple Array , ( Person) , , .
, . . - . Apple , , , , , - (). , , , .
. Swift , T. , , Holder<Child>, Holder<Human>, . Apple .
, :
class Human {}
class Child: Human {}
struct Holder<T> {
let thing : T
}
let holder : Holder<Human> = Holder(thing:Child())
, , . : Holder<Human>. , , thing, . . Holder<Human> Holder<Child>, thing , Holder<Child>, Holder<Human>.