FTR, I think even a library function that is defined as "the equivalent of
`append(a[:i], a[j:]...)`" (for example) would provide value.
That being said, I also think having this discussion now seems pointless.
Any of it will clearly not happen before generics land (or are rejected),
which is still at least a year out, AIUI. And even then, it'll probably
will be at least another go release or two to see how people use generics
and evaluate the usefulness of it. So litigating the pros and cons of a
package we can't even write for at least a year and won't have tangible
data available to base a decision off of for another one seems futile to me.
YMMV, of course.

On Sat, Feb 6, 2021 at 7:24 PM Jan Mercl <0xj...@gmail.com> wrote:

> On Sat, Feb 6, 2021 at 5:36 PM Sean <s.tolstoyev...@gmail.com> wrote:
>
> > I think there is definitely a need for a built-in "remove" function for
> arrays and slice.
> > Everyone is writing their own implementation for this, it is both
> confusing and "x = append(a[:x], b[x:])" like blablabla is not readable.
>
> Please define the semantics of "remove" operation. IINM, that has not
> yet been done in this thread.
>
> Note that "removes an element" of a slice is not an acceptable
> specification. That's circular and useless.
>
> The specification must define what happens to which elements of the
> slice. Additionally it must be specified what are valid arguments of
> "remove" and what will happen if they are not valid.
>
> --
> 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-Us2fvyhWMt2WLD4EDQAv%3Deab7ToH_94EWP_WxSg2ASEA%40mail.gmail.com
> .
>

-- 
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/CAEkBMfG9OMt59eT15QABrAJSf5KVGNSEcOf6qHH%3Dyyd0MS24MQ%40mail.gmail.com.

Reply via email to