News for hackers. Stuff that matters.
Re:Go Replaces Interface{} with 'Any' by earthboundkid on Tuesday December 14, 2021 @08:33PM (#29560894)
With generics, the metatype of a type variable is an interface type. If you just had T, it’s grammatically incomplete because you don’t specify the metatype. I guess you could just assume the any type if it’s incomplete, but that’s an unnecessary inconsistency in the grammar.
Re:Go Replaces Interface{} with 'Any' by eweise on Tuesday December 14, 2021 @11:32PM (#29562115)
I don't know. Making constraints optional is the way it works in all the other languages I use.