As said in The Go Programming Language on page 55: "an EXPLICIT conversion is required to convert a value from one type to another", even if both of them have same underlying type. For example:
type myByte byte
func main() {
var a byte
var b myByte
a = b // Compile error: cannot use b (type myByte) as type byte in assignment
a = byte(b) // OK
}
But for uint8 and byte, I'm surprised that the conversion is implicit:
func main() {
var a byte
var b uint8
a = b // OK
b = a // OK
}
So why?