Hacker News new | past | comments | ask | show | jobs | submit login

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.




But that's exactly what I was describing all the time...


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"


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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: