News for hackers. Stuff that matters.
Re:Making a Go program 70% faster with a one character change by erik_seaberg on Monday November 14, 2022 @01:56PM (#33599035)
Go maps and channels have reference semantics. Slices are passed and returned by value, but state may be 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.

There are no comments on this comment yet.