Structs can\'t have recursive value types in Swift. So the follow code can\'t compile in Swift
struct A {
let child: A
}
A value type c
I think it's about the required space.
To create a value of this type
struct A {
let child: A
}
we need
So we need infinite space.
On the other hand to create a value of this
struct A {
let children: [A]
}
we only need
A
Array
.