(Back to the OP's blog post)

This is an interesting read, thank you!

One question: did you consider using data []*T in the buffer?  If so, what 
made you discount it?  It seems a natural way to indicate "empty" slots in 
the slice.

Another way would be a separate slice of bools for marking whether each 
slot was empty.  Or have a single slice of a struct which contains both a T 
and a bool:
https://go2goplay.golang.org/p/jg3pEY8PwEn

On Friday, 29 January 2021 at 21:09:52 UTC Ben Burkert wrote:

> Hi Gophers,
>
> I wrote a blog post on my experience updating a package to use the
> latest proposed generics feature with the go2go tool. My overall
> impression is quite good as it was able to solve some existing
> problems with the package. Thanks to Go team & gopher community for
> all your work making generics happen!
>
> https://benburkert.com/posts/on-go2-generics/
>
> Cheers,
> -Ben
>

-- 
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/2e8ac798-7697-4aba-9a50-ca119f9ed6ccn%40googlegroups.com.

Reply via email to