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

2020-12-29 Thread redsto...@gmail.com
Of course generics will make everything harder. We learn harder, we read harder, we think harder, we write harder. I use C++ for more than 10 years. I know the harder. Whether or not experience is improving, life is harder and the language is rotten. On Wednesday, December 30, 2020 at 4:27:45 A

Re: [go-nuts] A new solution of type list in generic.

2020-12-29 Thread redsto...@gmail.com
5:14 PM redsto...@gmail.com > wrote: > > > > Constant here is just an example. We can use varaibles. > > var a, b int > > c := max(a,b) > > on the base of type inference. > > Predeclared types don't have methods.But we can extend the type > restriction,

Re: [go-nuts] A new solution of type list in generic.

2020-12-28 Thread redsto...@gmail.com
ore. So far as I can see, the implicit type conversion is better, at least it can be considered. If there is technical difficulty on the implicit type conversion, we can discuss it. On Tuesday, December 29, 2020 at 12:19:49 AM UTC+8 bbse...@gmail.com wrote: > On Mon, Dec 28, 2020 at 4:30 AM

Re: [go-nuts] A new solution of type list in generic.

2020-12-28 Thread redsto...@gmail.com
k the implicit type conversion here is better than type list in interface. On Tuesday, December 29, 2020 at 1:35:37 AM UTC+8 Ian Lance Taylor wrote: > On Mon, Dec 28, 2020 at 3:30 AM redsto...@gmail.com > wrote: > > > > If generic is inevitable, make it better. The type list in the

[go-nuts] A new solution of type list in generic.

2020-12-28 Thread redsto...@gmail.com
If generic is inevitable, make it better. The type list in the current draft is so special that it is added only for operators. I think it will bring complexity and inconsistens in go. So I get an idea to replace it. type bigger[T bigger] interface{ BiggerThan(T) bool } func max[T bigger[T]](

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

2020-12-25 Thread redsto...@gmail.com
25% of the survey takers answered the question means 75% of the survey takers think there is no need to and any features in the language. This is a common mistake of SURVIVOR BIAS. On Wednesday, December 23, 2020 at 4:49:48 AM UTC+8 Ian Lance Taylor wrote: > On Tue, Dec 22, 2020 at 1:24 AM Mar

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

2020-12-25 Thread redsto...@gmail.com
Yes, I agree with you. I use go for more than 3 years. The language is simple and elegant. But generics will destroy this. Generics bring a lot of complexity, make language seems ugly with only a few benifit. They say you can ignore it. Infact you can not. This language is on the way of corru