> a C program doesn't "know" at runtime that a struct is composed of other (typed) fields so it can do a proper deep field copy (or destruction).
This doesn’t make sense: you don’t need runtime introspection to do this?
This doesn’t make sense: you don’t need runtime introspection to do this?
Introspection (reflection) would go even further and provide at runtime all the information that you have at compile time about an object. But that's not required for assignment and destruction operations to work.
C doesn't have any of that, so a struct copy is just a shallow copy, a bit by bit copy of the entire struct contents. Which works pretty well, except for pointers/references.
So, no, runtime introspection is not needed, but runtime dispatch may be needed.