News for hackers. Stuff that matters.
Re:Channels Are Not Enough by mercurial on Monday September 15, 2014 @12:55AM (#8317343)
As somebody using pre-generics Java libraries from time to time, I can say with confidence that generics are not the cause of complexity. Casting from Object is a source of bad type safety and doesn't help with documentation. The complexity you'll find in a mature codebase is a function of the way it is architectured and the complexity inherent to the domain, mostly.
Re:Channels Are Not Enough by NateDad on Monday September 15, 2014 @09:22AM (#8318625)
I wish people wouldn't assume there's only two options - Generics or casting from Object/interface{}/void* It's a straw man argument. No experienced Go programmers are trying to say that's a good way to write code. The idea is to restructure your code so that basic data structures and interfaces pick up the majority of your reuse scenarios.
Re:Channels Are Not Enough by mercurial on Tuesday September 16, 2014 @10:02AM (#8324488)
I'm no Go programmers, but I relatively often need to take a parametrized basic data structure as storage and write a parametrize class on top of it, while hiding the data structure because it's irrelevant.

Well, I guess I'll keep not being a Go programmer :)