3 ms·
One of Go's tennets is "clear is better than clever", followed by "reflection is never clear". So no, idiomatic Go is not about using reflection, it's what we h
by mixedCase 8y ago
One of Go's tennets is "clear is better than clever", followed by "reflection is never clear". So no, idiomatic Go is not about using reflection, it's what we have to resort to because the language is so limited.
- dana321 8y agoWe're talking about simple reflection here, pass in the value, infer the type and cast to that type. Most people are totally confused by generics, i personally don't have a problem using them or not. At the end of the day, its just template metaprogramming.