Curriculum Types & methods
module 3 of 7
Types & methods
The biggest mental-model change so far. TS object literals carry methods; Go structs don't. Methods are functions with a receiver. Pointers become explicit. Nil exists for a specific list of types.
themes
Every type has a zero value — what an uninitialised variable of
that type holds. For numbers: 0. For strings: "". For bools:
false. For pointers, interfaces, maps, slices,…