2 ms·
I think knowing how to write modular code is somewhat separate from the advanced "library writer" features in C++. Anyone can write clean and modular code witho
by jandrewrogers 3y ago
I think knowing how to write modular code is somewhat separate from the advanced "library writer" features in C++. Anyone can write clean and modular code without them, just as you could before they existed. You don't lose expressiveness per se but from a library user perspective it requires a great many more things to be explicit, writing a lot more boilerplate, and a larger API surface area that you have to learn. The new C++ features give the library writer the option of investing in more elegant, flexible, and concise expressions of modular code with little additional work but requiring stronger C++ skills to elevate the modularity in this way.
It is an ease-of-use improvement as much as a modularity improvement and provides some evolutionary pressure to design better interfaces to modular code.
- angiosperm 3y agoWhen you are designing an interface, and a new feature could make it better -- safer, faster, less convoluted -- but you fail to use it, you have produced a worse interface.
- foofie 3y ago> Anyone can write clean and modular code without them, just as you could before they existed. I don't think so. There are multiple books dedicated to the topic of writing modular code, including books specialized in C++. Projects such as Qt are renowned for having adopted architectural traits that ensure they do not break compatibility even following a major version upgrade. I still see projects not respecting contracts and what not to put in the interface. I think that this belief that "anyone can write clean and modular code" contrasts with reality, and suggests a certain obliviousness regarding the problem domain.