Re: [go-nuts] [generics] notes on adding generics to a package

2021-02-08 Thread Martin Leiser
Am 07.02.2021 um 22:36 schrieb 'Axel Wagner' via golang-nuts: Some immediate thoughts on that: 1. It seems like a strange design decision, to let the importer mess with *any* exported interface type. it is, but it is simple. In general, Go takes a pretty firm stance that the semantics of a p

Re: [go-nuts] [generics] notes on adding generics to a package

2021-02-07 Thread 'Axel Wagner' via golang-nuts
Some immediate thoughts on that: 1. It seems like a strange design decision, to let the importer mess with *any* exported interface type. In general, Go takes a pretty firm stance that the semantics of a package should be determined by its author - for example, you can't add new methods to types.

Re: [go-nuts] [generics] notes on adding generics to a package

2021-02-07 Thread Martin Leiser
I follow the discussion about go generics for some time now, but never tried using them. Your conclusion > I struggled to grasp generics at the outset of this experiment. They are complex in a way that I haven’t encountered in a while with Go: I wasn’t sure when to reach for them and when to us

Re: [go-nuts] [generics] notes on adding generics to a package

2021-01-29 Thread Ian Lance Taylor
On Fri, Jan 29, 2021 at 1:09 PM Ben Burkert wrote: > > 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 te

[go-nuts] [generics] notes on adding generics to a package

2021-01-29 Thread Ben Burkert
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 ge