News for hackers. Stuff that matters.
Re:Go by Example by 0xdeadbeefbabe on Friday January 17, 2014 @02:35PM (#7077917)
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

Re:Go by Example by dvirsky on Friday January 17, 2014 @05:14PM (#7078811)
I 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 :)

Re:Go by Example by earthboundkid on Friday January 17, 2014 @08:52PM (#7079680)
I 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