|
|
|
|
|
by wonderzombie
5065 days ago
|
|
Most of the time, a combination of interfaces and slices (read: souped up arrays) is enough. In practice, when your arrays don't suck like they do in C, C++, or Java, you can get a lot of work done with them. It's actually clearer as to what's going on since slices are a language primitive. They are simple and extremely transparent. This is absolutely not the case with Java's collections library or the C++ STL. It wouldn't be a trade-off if there weren't situations where generics are really useful. But this rings more like an armchair criticism of Go than a criticism from someone who's written some Go programs. For my part, I wish languages like Java were less hostile to arrays. |
|
If this is 'armchair criticism' why do Go's designers say they are considering adding generics support?