News for hackers. Stuff that matters.
Re:Go 1.2 by friendly_chap on Friday November 29, 2013 @06:16AM (#6818930)
Let's take a basic list operation, map.

Map takes a transforming function and a list, and transforms each element.

type MyString string

func NewMyString(s string) MyString{return MyString(s)}

a := []string{"A", "B", "C"}

If you want to create a []MyString from []string, now you have to loop over that and transform by hand, with generics you could do map(NewMyString, a).

Re:Go 1.2 by grey-area on Friday November 29, 2013 @06:20AM (#6818945)
Thanks