Hacker News new | ask | show | jobs
by coldnose 1823 days ago
For integer primitives, all possible values are valid. Just allowing binary initialization for structs that consist of integer types would allow compatibility with C structure. As it is, I have to either resort to unsafe code or manually deserialize every struct
1 comments

Oh I see, that makes sense. Also there's a sibling reply to yours for a cool looking proposal to do just that if you haven't seen it yet.