FAQ

On Tue, Jan 13, 2015 at 10:43 AM, Gao wrote:

They are essentially identical. I prefer the copy, only because I think
it's more obvious what you're doing.
Why are they identical?
If the the slice has enough capacity (which it always will when removing an
item), append sets the correct length and copies the data; exactly what
you're doing with the copy+slice operation.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 6 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 13, '15 at 2:38p
activeJan 13, '15 at 3:54p
posts6
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase