too; it’s the ones that get missed that are the problem because convention will do nothing to prevent silly mistakes.
Like many things in Go, there are steps the language could take but chooses not to. For example, Swift implements copy-on-write for variable-length arrays. I’m not qualified to comment on whether the Go team is right or wrong in their decisions, but these aren’t unsolved problems.
``` a = append(a, elem) ```
If you assign it to anything else, `a` might still remain with the older slice memory which will cause worse problems than equality comparison.
So the kind of code you wrote is hardly ever written in production.
The advantage of having this is avoiding one more heap allocation for slice, which is a good tradeoff if you ask me.