3 ms·
Seems to me that a struct isn't really any philosophically different to say a float. The only difference it that it's larger.
by nicoburns 4y ago
Seems to me that a struct isn't really any philosophically different to say a float. The only difference it that it's larger.
- flohofwoe 4y agoOne problem I can imagine is that builtin struct types might have implications for ABIs. The C standard probably would prefer to not define their interior and memory layout for portability, but these things need to be clearly defined for ABIs. For instance in a slice type, does this have a start and end pointer, or a start pointer and size? Does the pointer or size come first? Is size the number of elements, or number of bytes? Alignment? Padding? Etc...