Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If this is mainly useful for working with plain/uninterpreted byte arrays, then I wonder why we can't just do `[u8; N]::with_noinit()` method instead of doing the multi-line plus unsafe things listed in the article.

Is the main point that things like `slice_freeze_mut` could also be used for slices of e.g. `struct Coordinate { x: u32, y: u32, z: u32 }`?

It would obviously not work for f64 things, since there also not all bit-patterns are valid.



All f64 bit patterns are valid.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: