In this lecture, we will look at why
Go needs semantic numeric types on top of
int, how the
type declaration works (for example,
type
Status
int), why
Status and
int are incompatible types, how to make explicit conversions
Status(
code) and
int(
s), how to define named values with
const, and why “magic numbers” like
2 hurt readability because of untyped constants.