Closed
Description
Integer types are convertable to each other. I propose to extend it to arrays:
a := [2]uint16{1, 2}
b := int32(a)
c := [4]byte(a)
d := uint32(65537)
e := [2]int16(d)
This will allow to see:
- sub-bytes or sub-words of a larger integer variable
- bytes/words in an array as a larger integer
without unsafe.Pointer
tricks.