3 ms·
Reading redundant code is always more work than letting the computer handle those low-payoff details. And nobody's going to provide their data structures speci
by erik_seaberg 8y ago
Reading redundant code is always more work than letting the computer handle those low-payoff details.
And nobody's going to provide their data structures specialized to every type you could possibly want. Case in point: container/heap from the standard library takes and returns interface{}.
- the_clarence 8y agoOh no. Believe me reading code full of templates is not a pleasure. There is a reason Go is so pleasant to read.
- int_19h 8y agoC++ templates are hardly the best example of generics out there, and certainly not what you should be looking at from a Go perspective, seeing how Go is a higher-level language that doesn't concern itself with zero-cost abstractions anywhere near as much as C++ does. Look at C# or D generics instead.