5 ms·
If your abstractions are beautiful and clean, then you're absolutely right -- hiding the complexity is great! But you know what? 99% of the time, your abstracti
by gwillen 15y ago
If your abstractions are beautiful and clean, then you're absolutely right -- hiding the complexity is great! But you know what? 99% of the time, your abstractions are shitty and leaky. And then I need to know what's under them in order to work with them confidently.
So yes, absolutely hide complexity. But hide it judiciously; hide it only when you know you have a clean, well-designed and well-constructed abstraction that won't leak to the outside. But if you hide complexity behind a leaky abstraction, which most of them are; then now, as they say, you have two problems.
- rickmb 15y agoI feel the concept of "leaky abstractions" is being abused way too much as an argument against all abstraction. Except in the well known cases, like trying to abstract away SQL to give it an OO interface, the leakiness of abstractions is rarely a big issue if those abstractions are decently designed. Not even beautiful and perfectly clean, just good enough for their purpose. Yeah, it sucks in those rare cases where the abstraction makes it hard to figure out what the hell is actually happening, but the extra effort is nothing compared to the amount of pain saved by having that abstraction throughout the rest of the development process. All plumbing will spring a leak some time (and sometimes with pretty costly consequences), but that in itself is no argument against plumbing.