On Thursday, March 1, 2018 at 12:46:13 PM UTC-5, Axel Wagner wrote:
>
> There is another significant difference 
> <https://play.golang.org/p/UZgairTbE0Y> between append and copy, which is 
> that copy only copies the minimum number of elements in either slice. So, 
> if you want to simulate copy via append, you'd need to at least throw a 
> couple of if's in there. Of course, the other way around (to implement 
> append using copy) you also need to add more code, for the reallocation and 
> the like.
>
> So, yeah, copy and append can be implemented via each other, but I 
> wouldn't exactly call either of them "not essential".
>
>
>
yes, both have their best use scenarios.
 

> On Thu, Mar 1, 2018 at 6:00 PM <di...@veryhaha.com <javascript:>> wrote:
>
>>
>>
>> On Thursday, March 1, 2018 at 11:50:53 AM UTC-5, andrey mirtchovski wrote:
>>>
>>> > I don't know that. append was not in Go 1.0? 
>>>
>>> Go the language was opened to the world on Nov 10, 2009. Go 1.0 was 
>>> released 28 March 2012. 
>>>
>>> Append appeared on Oct 27, 2010: 
>>>
>>> https://github.com/golang/go/commit/d8b5d039cd1bec151cc325973ff32bd34ebb0456
>>>  
>>>
>>
>> get it.
>>  
>>
>> -- 
>> 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...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to