Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xiaq
on April 14, 2016
|
parent
|
context
|
favorite
| on:
Proposal: Go should have generics
No, the sort package requires you to define methods on the
slice
of what you want to sort. For instance, if you defined a struct S, you need to implement Less, Swap and Len on an alias type of []S (since you cannot implement methods on slice types).
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: