>> I am not saying that generics is bad, but I am questioning whether generics is necessary.
Please, do not panic. If you worry about the following things: - Generated code will grow when used generics - Generated code will be more complex when used generics - Execution performance will slow down when used generics - Memory consumption will grow when used generics I can say you. - Generated code will NOT grow when used generics - Generated code will NOT more complex when used generics - Execution performance will NOT slow down when used generics - Memory consumption will NOT grow when used generics They are so arranged that they are universal for all uses cases and does not require a significant changes in the following things: - Compilers - Runtimes - Reflections Most of the type checks will be performed at the compile time only because the Go language is statically typed language. Most of the type instances (instances of the generic types which will be created at runtime) will be stored for the further reuse (they will be not created again and again but they will retrieved from the hidden static variables, so called lazy getters). Only when used reflection then they (newly created type instances) can get some overhead but just a little bit more then with non-generic types. Generic types is not evil, nor complex. They are still the same types but only with the parameters (this is single kind of complexity which for me is not complexity at all) and they are variative (but this is not a complexity this is just a rules). -- 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. For more options, visit https://groups.google.com/d/optout.