2 ms·
I don't agree that abstraction layers inherently hide inefficiencies. In C++, `unique_ptr` is an "abstraction layer" with no runtime overhead, that will probab
by tombert 11y ago
I don't agree that abstraction layers inherently hide inefficiencies.
In C++, `unique_ptr` is an "abstraction layer" with no runtime overhead, that will probably make your code faster due to the better safety.
- Piskvorrr 11y agoI don't see such claim anywhere in the article (your "inherently" vs. author's "often").
- tombert 11y agoThat's true, but he makes the point to remove the abstractions, and I'd argue that no, fix the abstractions.
- jstanley 11y agoActually, that's not the point I was trying to make! I was trying to say: "consider the abstractions, and make them more leaky when necessary" (e.g. allow a flag to say "don't do the expensive calculation"), not "remove the abstractions".
- PaulHoule 11y agoThey don't necessarily hide inefficiencies, but they do give them a place to hide. It can be looked at on a few levels. One is the "simple things" that waste a few seconds here and a few seconds there and pretty soon we are talking about hours. Another is the algorithm that does more work than it has to do, scales poorly, etc. In my mind "encapsulation" and "abstraction" do tend to be leaky when it comes to things like: performance, security, thread safety, scalability, etc.
- jammycakes 11y agoDepends on what kind of abstraction layer you're talking about. The traditional BLL/BOL/DAL architecture is probably the worst. It aims for some kind of fantasy "separation of concerns" between the business layer and the data access layer, but many concerns simply can't be classified as exclusively business concerns or exclusively data access concerns. When people attempt to introduce and enforce such a separation, they end up with all sorts of performance problems.