3 ms·
It's not much import loops rather than introducing fine-grained conditional compilation, since behavior changes depending on whether a trait is imported or not.
by aatd86 2mo ago
It's not much import loops rather than introducing fine-grained conditional compilation, since behavior changes depending on whether a trait is imported or not.
That has an effect on incremental compilation unless I am mistaken.
So even if generics were there from the 'get-go', I am not sure this exact feature would be added anyway.
In fact, it is mostly contrary to Go's structural polymorphism, let alone parametric polymorphism.
Typically what you want would be defined as a function, a specific wrapper type... If it is not already a common method of each shape.
So far, I don't feel like the design of Go's generics suffers from any real issue. The implementation is not 100 percent done yet. But the plan looks sound to me.