Assuming for a moment that I have a legitimate reason to do this, is there any danger to casting &[i32] <-> &[f32] ?
Context: I have this system where the user can declare new "types" at runtime, as longa s the types consists of only i32 & f32's. So they can declare the type (i32, i32), (i32, f32), (i32, f32, f32), but not the type (i32, u8, i32). My plan is to just store this as a Vec and store how many elems the 'type' contains. My question here is -- casting between &[i32] <-> &[f32] .. are there any gotchas? (Seems like there should be none, as they have the same alignment).
EDIT: It's fine if the values is just reinterpreting bits. I'm not expecting it to do an element wise "as i32" or "as f32" when I cast the slices.