4 ms·
What do you mean Go doesn't have a strong type system? Are you refering that it allows for interface{}?
by the_clarence 8y ago
What do you mean Go doesn't have a strong type system? Are you refering that it allows for interface{}?
- int_19h 8y agoI think it's more that it requires it in many cases, due to the lack of generics.
- the_clarence 8y agoI always find work arounds or just write more code. I feel like it's annoying sometimee but when reading code I feel blessed that generics are not supported.
- erik_seaberg 8y agoReading 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.