News for hackers. Stuff that matters.
Re:Everyday hassles in Go by vardump on Tuesday December 30, 2014 @10:24AM (#8814921)
Best joke in the industry:

"Code reuse!"

Cracks me up every time. ;-)

We fall for those words over and over again. But in reality, sadly, reuse almost never happens. Maybe one day, maybe even in the next project...

Re:Everyday hassles in Go by coldtea on Tuesday December 30, 2014 @11:28AM (#8815224)
>We fall for those words over and over again. But in reality, sadly, reuse almost never happens. Maybe one day, maybe even in the next project...

I don't know in what industry you work for. In the IT industry code reuse very much happens every time.

It might not be using code from your previous project to build the next one (through people do that ALL the TIME), that it's very much using common libs for thousands of projects.

The kind of code reuse he talks about has been working perfectly fine for ages. E.g a generic sort, filter etc function, instead of having to handle the basics every time.

Re:Everyday hassles in Go by falcolas on Tuesday December 30, 2014 @10:34AM (#8814954)
Like c's 'libc', or C++ boost, or pythons 'requests', or...

Lots of code reuse there that depends on generics.

Re:Everyday hassles in Go by vardump on Tuesday December 30, 2014 @10:48AM (#8815021)
Yes, libraries get used. That's their point. My point was, that very little of application code ever gets reused, although we somehow always think it will.
Re:Everyday hassles in Go by falcolas on Tuesday December 30, 2014 @11:12AM (#8815134)
And most people are asking for generics to write libraries which don't rely on unblocking interfaces.

Even in the process of writing a single program, there are a number of times where you reuse certain bits of logic, and having generics makes it easier to refactor those into a single function, instead of duplicate code with multiple types (or overly generic types).

Re:Everyday hassles in Go by codygman on Tuesday December 30, 2014 @02:35PM (#8816258)
That's why you write or update libraries before writing an application, so it can be reused and your application specific code is minimized as much as possible.