Comment

Comment by kbolino

This isn't really a practical problem.

If you created the slice, you control it and you can modify its elements, append to it, etc.

If you didn't create the slice, you don't control it. If you want to modify it or append to it, you should copy it first.

This has reflected how I've seen Go used professionally by people experienced in the language. The language could offer more help (but probably never will), but it's not hardly a regression from C. The real regression from C is the lack of const pointers.

parent kbolino 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton