News for hackers. Stuff that matters.
Re:Go generics are not bad by orthoxerox on Saturday July 09, 2022 @06:06AM (#32033537)
Rust also has associated types, which are exposed to the implementer, but not to the consumer.
Re:Go generics are not bad by maxbond on Saturday July 09, 2022 @09:54AM (#32035099)
I mean, generics and associated types aren't equivalent, but they also are often exposed to the consumer. Eg, if you're accepting an Iterator, you'll want to populate the Item associated type.