|
|
|
|
|
by btilly
2514 days ago
|
|
Which interfaces-based solution? The one used by sort is a hack that only works for some of the things that you would want to do. The one where you use introspection performs badly and isn't typesafe. The tree implementation in the article cannot be done in a safe and performant way in Go today. |
|
It's not a hack: it's a runtime equivalent that requires that your type implements some interface.