From here which was linked in the article:
<a href="https://bitfieldconsulting.com/golang/generics" rel="nofollow">https://bitfieldconsulting.com/golang/generics</a><p>Why [T comparable] and not [T constraints.Comparable]?<p>One is inbuilt, the other is just an interface defined in a package? Compiler would check if the types all implement the required operators in both cases, no?<p>I am no Go programmer and don't know the language specification, just asking out of curiosity.