Zig: Tiptoeing Around @ptrCast

from blog openmymind.net, | ↗ original
A variable associates memory with a specific type. The compiler uses this information to generate the correct instructions (or to tell us that our code is invalid). For example, given this code: const std = @import("std"); const User = struct { id: u32, name: []const u8, }; pub fn main() !void { const user1 = User{.id = 1, .name =...