Re: [go-nuts] Re: Generics, please go away!

2021-01-01 Thread Beka Westberg
> First of all I feel it's more rhetoric, it's same as "Less is exponentially more", and "[Go] ... Arguably more object oriented than say Java or C++ ". I believe if you think logically "less" could not be "more", right, and you wouldn't insist on that? Same goes to the statement that Go is mor

Re: [go-nuts] Generics and parentheses

2020-08-17 Thread Beka Westberg
> No support covariance or contravariance. Maybe I am on shaky ground in terms of my understanding but doesn't this mean, for instance, that if I have two interfaces, Foo and Bar, and a third composite interface, FooBar, which consists of Foo and Bar, that a function with a generic parameter T

Re: [go-nuts] [ generics ] Concrete example of comparables and generic function types

2020-08-14 Thread Beka Westberg
" argument to Op isn't necessary either AFAICS - you > could just use a zero value instead (unless you actually want to be able to > have a non-zero "zero" value, I guess). > > cheers, > rog. > > > On Fri, 14 Aug 2020 at 04:37, Beka Westberg wrote

[go-nuts] [ generics ] Concrete example of comparables and generic function types

2020-08-13 Thread Beka Westberg
Hello! I just ran into a problem that is solved really nicely with the new generics proposal and I thought someone might find it interesting :D I was trying to implement a library for doing ascii art programmatically. The main struct is basically an image.Image except it works with bytes instea