|
|
|
|
|
by cookiengineer
2 hours ago
|
|
> generics were a slippery slope. give it a decade and Go will be indistinguishable from c++ Lib boost will have conquered every language by then!!! :D Jokes aside, generics are unusable in a lot of languages due to their syntax choices. In Go we kinda have the problem that there's no real templating and no real macros, so they're even harder to use. But I agree somewhat, generics feels to me like an anti pattern in Go. Also, the way the Go core/stdlib is written, it makes generics so unnecessarily painful to debug. Why they decided to have definitions like "~C" or "~[]S" is beyond me. No human knows what the resulting compile time error means. They should have named these things "Comparable" or "Slicable" or whatever is more expressive. Just stop with this stupid single letter shit. |
|