What's coming in Go 1.18
What's coming in Go 1.18
Posted Feb 9, 2022 13:19 UTC (Wed) by tsavola (subscriber, #37605)In reply to: What's coming in Go 1.18 by taladar
Parent article: What's coming in Go 1.18
constraints.Ordered was supposed to be shipped in the standard library (I guess it will be added in a later release). Go doesn't support operator overloading, so only primitive types (and ~primitive types) can have the < operator.
For generic code invoking methods, you can define interfaces with methods - you don't have to list concrete types.
