3 ms·
Hi, author here :) > The term "abstraction overhead" is already defined Interesting, I didn't know that. I was just trying to describe an idea I had in my hea
by RandyGaul 7y ago
Hi, author here :)
> The term "abstraction overhead" is already defined
Interesting, I didn't know that. I was just trying to describe an idea I had in my head, and not hijack some pre-existing term.
> Most of us don't get the luxury of discarding a system and rewriting from scratch. Instead, we make the code we have maintainable. Each of the tools the author reviles is present in the language specifically because using it properly makes libraries and programs more maintainable.
You're right. Re-writing things is a luxury.
> The alternative would be to say that systems in raw C, or assembly language, are more maintainable, which is obvious nonsense.
Well I didn't say that, and I don't agree that it's the alternative, as it's merely a single alternative. I tried to focus on encouraging a skeptical nature when picking language features to use, and tried to demonstrate the idea of applying skepticism with my own personal examples/choices. The purpose of the skepticism is to encourage conscious cost/benefit analysis that takes into account compilation time, but also how easy code is to grok by new eyes.
- comex 7y agoDon't worry about the parent's excessive negativity. Fast compilation time is a huge and underappreciated benefit. As for abstraction... I personally disagree with some of your conclusions as well, but I also recognize it's a fundamentally subjective topic. After all, how easy something is to understand depends on who is trying to understand it. Different people have different preferences and are familiar with different coding patterns.
- ncmncm 7y agoThank you, this makes your intention clearer. You should know that it is very common to advocate subsetting C++, mostly by people who prefer not to learn anything new. These efforts are always based on the fundamental mistake that old, familiar features are implicitly better than new features, so new features should be treated with especial suspicion. But new features obsolete old ones specifically because we know more today how to write fast and reliable software. So, if you consider subsetting the language, look at the totality of features, and favor new features over old. C++ inherits a great many design flaws from C, and constructs that depend on those flaws should be the first to go. Constructors, destructors, in-class member initializers, and exceptions are a huge win for reliable code. They have no effect on compile time, vs. dodgy C-like ways to achieve the same ends. Many of the newest features, particularly those connected to constexpr and concepts, replace dodgy template metaprogramming constructs that are very slow to compile.