What is the logic behind this restriction? Something about the representation of non-pointer optionals?
I'd think it's because there's no concept of optional values in C, yet optional pointers can be represented in the same amount of space (using 0 as indicator for a null pointer), whereas optional non-pointer values take up extra bytes, e.g. a ?u8 is actually 2 bytes, a ?u16 is 4 bytes, a ?u32 is 8 bytes...
An argument could be made that by that logic slices shouldn't be supported either (but they are), so I really don't know the reasons... :)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
For further actions, you may consider blocking this person and/or reporting abuse
Take off every Zig!