This is a suggestion about the declaration of a generic type. There is
something unnatural in the syntax:
type SomeIntf(type T) interface {
...
}
type SomeStruct(type T) struct {
...
}
func SomeFunc(type T)(...) {...}
In all of the above, the names SomeIntf, SomeStruct, and SomeFunc are
being defined as generic types. However, all the regular types are
defined using the pattern:
"type" typeName typeDefinition
So why not:
type SomeIntf interface(T) {
...
}
type SomeStruct struct(T) {
...
}
func(T) SomeFunc(...) {...}
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/CAMV2RqqDiaKjzisPp-Z2GTT4uynWV%2Br25%2Bdv184HW6cHxwronA%40mail.gmail.com.