3 ms·
Ah, thanks! I tried converting that example to Zig: https://tars.run/t3eInpPFAgc https://tars.run/t3eInpPFAgc Is that the idea? You can do the same thing wra
by mtlynch 2y ago
Ah, thanks! I tried converting that example to Zig:
https://tars.run/t3eInpPFAgc https://tars.run/t3eInpPFAgc
Is that the idea?
You can do the same thing wrapping integers with structs, but enum makes it slightly more concise?
- ImprobableTruth 2y agoYes, that's how it works. I think in Zig for new types you'd use enums for ints and packed structs for more complex types.