Generics is a non essential feature in that you can live without it. However, 
it is not without merits. Generics is a bridge to higher level expressions. If 
Go wants to add "modern" features in the future, it will stumble upon the need 
for generics in one way or another. 

While simple, code duplication can be a pain when you need to change existing 
code. Instead of making the change in one place, now you need to do it in many 
different places and you must ensure not to forget any of them. Otherwise, it 
may cause bugs, some of which may be subtle. It gets worse if the code is some 
else's work that you may not be thoroughly familiar with. Of course, being 
engineers that we are, we can find workaround to mitigate the problems using 
testing, documentation, project organization, IDEs, etc.

There is nothing wrong with Go not having generics. However, dissing generics 
as if it is useless is just not right. It's all about having the right tool for 
the job.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to