News for hackers. Stuff that matters.
Re:The Cost of Abstraction (2016) by Nursie on Monday February 25, 2019 @02:49AM (#19243835)
I wouldn't necessarily consider that a wrapper, personally, but a reasonable set of functionality behind an interface to said functionality. The only thing I'm really arguing with is the insistence that one should wrap everything as a matter of course.

Reduction of complexity, like your example, is great. Increasing levels of indirection thoughtlessly is adding to it, IMHO.

Re:The Cost of Abstraction (2016) by jstimpfle on Monday February 25, 2019 @04:51AM (#19244393)
But that's exactly what I was describing all the time...
Re:The Cost of Abstraction (2016) by Nursie on Monday February 25, 2019 @06:07AM (#19244718)
I got the impression you were saying every dependency should always be wrapped, regardless.

I was a C coder for many years, these days I seem to be doing java. There are dependencies in my recent projects that just do what I need, no particular domain translation required. Particularly things like the Apache commons libraries, which provide well formed utilities for common operations. It would be a waste of time and energy to wrap them simply for the sake of having a wrapper.

If this sort of thing isn't what you were driving at, then we've just been miscommunicating. I am 100% for encapsulation of functionality into good, discrete modules which provide sensible interfaces and minimal (but expressive APIs). I just don't like the blind application of "this isn't our code therefore we must provide an interface"

Re:The Cost of Abstraction (2016) by jstimpfle on Monday February 25, 2019 @12:15PM (#19247255)
Yes I wouldn't wrap a Hashmap or anything I can write myself in less than 100 lines. Particularly if it has a simple and familiar interface.