I see a lot of Odin code that seemingly uses byte as an alias for u8, but I’m not exactly sure because it’s not explained anywhere in the overview or the Odin book. Is it deprecated? Does it have special semantics that u8 doesn’t have?
https://pkg.odin-lang.org/base/builtin/#byte
Not deprecated or special, u8 and byte are exactly equivalent. It just comes down to personal preference/intended usage.
1 Like
Ok, that’s helpful.
It is used as a convention to distinguish values from 8-bit unsigned integer values.
That makes a lot of sense for why I should use byte, I just wish it was in the overview or the book.