|
|
|
|
|
by wyager
4293 days ago
|
|
Go doesn't prevent "magic", it just makes you hide the magic in ugly places. Can't have a flexible iterator system because it might introduce complexity? Better just hide complexity in a next() function. Can't have generics (except for the google-approved map, slice, chan...) because it might introduce complexity? Better just shift that complexity to unsafe use of interface{}. |
|
And again, I think it is a feature and not a bug.
I didn't always think that way, I had a really rough start with Go because I was using it as if I were programming in a slightly different dialect of C++ which it isn't. When I write Go as if it is Go, I just don't see these "missing features" as problems at all.
But this debate has been going back and forth since Go was first made public, so anyone who has tried Go and dismissed it based on these lack of features is unlikely to be persuaded otherwise here and they should continue to use other languages until such a time as Go supports what they want (if ever). That's the beauty of having so many languages to choose from.