If you're familiar with Python and Go, you'll likely be able to quickly spot the differences in how they handle parameter passing. Python uses references and Go uses value.
Go maps and channels have reference semantics. Slices are passed and returned by value, but backing arrays are often shared (not copied) in an error-prone way, so it’s safest to pretend they have move semantics and treat only one copy as valid.
IMHO they should have used pointers everywhere they didn’t want value semantics with deep copies.
erik_seaberg|3 years ago
IMHO they should have used pointers everywhere they didn’t want value semantics with deep copies.