3 ms·
If only there were a workaround for not having generics, sigh. But seriously, they may not implement generics out of spite or just to troll generics zealots.
by 0xdeadbeefbabe 13y ago
If only there were a workaround for not having generics, sigh.
But seriously, they may not implement generics out of spite or just to troll generics zealots.
Edit: remove ambiguity
- dvirsky 13y agoI recently added the statement "type T interface{}" to a piece of code, as a private joke about the generics-in-go talk. now my code looks like "func map(x []T, f func(T) T)" and everybody's happy :)
- earthboundkid 13y agoI firmly believe that when Go introduces generics, the syntax should look like: type T1 generic type T2 generic func Map(f func(T1) T2, s []T1) []T2