News for hackers. Stuff that matters.
Re:“Swift will be open source later this year” by dmacvicar on Tuesday June 09, 2015 @03:59AM (#9684560)
If you write Go code, you will realize you will actually not hit that problem often at all.

Right now the annoyance I hit more often is the inability to map a []Foo on an attribute .Name (string) to get a []string. I do that in ruby all the time, and with Golang it really sucks to do a for loop to collect stuff appending to a new array.

  people.map(&:name) => ["Joe", "John"]
vs

  a := make([]string, 0)
  for _, p := range people {
    a = append(a, p.Name)
  }

There are no comments on this comment yet.