- Summary of (heap) allocation mechanisms
- Creates slices, maps, channels
- returns initialized T
- assignment creates a new variable which points to the same storage location
- Similar to a reference in c++ (but not the same)
- returns a pointer
- Official docs
- Allocates memory on heap (like
calloc
in c) - Does NOT initialize memory
- Official docs
- Use
make
90% of the time