On 21-12-2020, Martin Hanson wrote: > I have just suggested the same thing @Space A, before I read your message and > I agree fully! > > https://github.com/golang/go/issues/15292#issuecomment-749032046 > > I strongly believe we need to fork Go if generics gets added and then let the > toy people have their new shiny things in Go while we rename Go into > something else and stay with Go 1. Then we need to have the first and most > important rule, that NOTHING new gets added to Go 1. > > Go definitely needs a fork if generics gets added! >
It could be easy to fork Go and just forbid generics but you'll loose all the libs that will use generics. And it's in libs that generics is most usefull (like interfaces) ! I'm not so afraid of generics. When i see the last draft, we can even says that we already have a form of generics at method level with concept of interface since beginning. When we use io.Reader, it's generic, we don't wait for a type. The way generic are added it's not really generics like in other langages, it's type parameters with constraints like with interface with method. It's not really a new concept in Go. We already can abuse of empty interface{}. It'll be the same with type parameters, we could abuse of type 'any' but most of the time we'll use type parameters with constraints, like interface with method and it'll keep strong. Sorry for my bad english, if somebody understand and could rewrite what i mean ? -- wilk -- 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/rrseie%249sm%241%40ciao.gmane.io.