| ▲ | dwroberts 10 hours ago | |
> First of all, structs aren't used so you don't have to invent names for them (e.g. there is no IntVec) But since it’s storing a void pointer any way, they wouldn’t need separate names right? You could use one struct everywhere regardless of the type of the items Which IMO is a better idea than using an array here because the fields can be properly named and typed to prevent accidental misuse | ||
| ▲ | sparkie 10 hours ago | parent [-] | |
If you use a struct with a `void*`, you also need to specify the type on usage, where here it's done with `typeof`. | ||