On Sat, Feb 6, 2021 at 8:01 PM Axel Wagner
<axel.wagner...@googlemail.com> wrote:

> FTR, I think even a library function that is defined as "the equivalent of 
> `append(a[:i], a[j:]...)`" (for example) would provide value.

Yes, but IMO a net negative value. Many people will then mindlessly
just use this O(n) variant even though in many cases the O(1) version
could and should be used instead.

Also, note how easy it is to fall into the O(n^2) trap with this
definition of "remove".

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-Wksnhkf%3Duy1B9Dnzi47PfkabL5YTt2abiYKWSdWj1ZXA%40mail.gmail.com.

Reply via email to