I think it's about the required space.
Infinite space
To create a value of this type
struct A {
let child: A
}
we need
- the space for the current struct
- the space for the child
- the space for the child's child
- ...
So we need infinite space.
Finite space
On the other hand to create a value of this
struct A {
let children: [A]
}
we only need
- the space for
A
- the space for an empty
Array
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…