Skip to content

Add further append explanation - #923

Open
Dava96 wants to merge 2 commits into
quii:mainfrom
Dava96:amend-slices
Open

Dava96 wants to merge 2 commits into
quii:mainfrom
Dava96:amend-slices

Conversation

@Dava96

@Dava96 Dava96 commented Sep 26, 2026 •

Copy link
Copy Markdown

I've added a further explanation to the append function. Although I was a bit torn if It's neccesary given that the intent is to explain append can dynamically grow a slice. Having the explanation of the memory allocation repercussions of this might be beneficial to those learning Go (like me).

The reason I think this clarification could be beneficial is that in my mind when we refactor code the intent is to improve it but in this case in the refactor it makes it less performant than if you was to just use make instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant