13 ms·
C certainly does have struct types. Apparently you mean something by "struct types" other than the well known C feature. Can you elaborate?
by _kst_ 3y ago
C certainly does have struct types.
Apparently you mean something by "struct types" other than the well known C feature. Can you elaborate?
- flohofwoe 3y agoEmphasis on 'builtin' :) For example, Zig's slice type is a 'builtin struct' which contains a pointer and size, the builtin error union type is made of an error code and the actual result type. These things are not provided by the Zig standard libary, but instead built into the language. In contrast, C's builtin types are all 'primitives' (pointers, integers and floats) - with the arguable exception of VLAs, which have been made non-mandatory in C11.
- uecker 3y agoWe made VLA types and derived types (variably modified types) mandatory in C23. (but not VLAs on the stack as automatic variables which are still optional)