On Fri, Feb 5, 2021 at 6:46 AM Fernando Meyer <f...@pobox.com> wrote:
> I understand the pragmatism behind having or not features in the language > and its standard library. But, almost all the golang projects I've worked > with implement their own utility function to remove elements from a slice, > sometimes with order in place, others not. Mostly always these home-brewed > libraries ignore bounds-checking introducing runtime problems if the user > is not careful enough. > > That said, when a feature becomes a ubiquitous necessity across so many > codebases, I believe it should be considered to have a standard > implementation. > This seems like a clear case for using generics, so let's wait on this until we see whether the generics proposal is adopted and implemented. I think it is preferable to use a general language mechanism than to add a special purpose function to the language. See my notes about append at https://www.airs.com/blog/archives/559. Ian -- 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/CAOyqgcX4J4a_djjr6fAA27NBzp3fKu48k%3D05HZDhA7dRUOpHmw%40mail.gmail.com.