2 ms·
> It feels much too pragmatic for my taste It doesn't feels pragmatic at all. It relies on users to do the compiler's job(type assertions) , because "You dont
by aikah 11y ago
> It feels much too pragmatic for my taste
It doesn't feels pragmatic at all. It relies on users to do the compiler's job(type assertions) , because "You dont need that with Go"TM ...
- girvo 11y agoIt feels "pragmatic" in that Go follows "YAGNI" almost to a fault. It makes the argument that repeating yourself can sometimes be a better choice than more abstraction to increase code clarity. Some disagree with that, which is why it's nice to see other languages taking on similar areas that Go tackles but with differing choices in that area.
- dmacvicar 11y agoIf 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) }