My not-so-good anymore eyes (shaddup... it will happen to you, too!)
are starting to glaze-over here.
If you're starting to write code that ventures into this kind of esoterica in the definition (past or present or future) of the C++ language ...
... then you need to be advised from the outset that "you are in the process of making what will one day be regarded as a package of unmaintainable sh*t."
Please, hear me out.
If there are but two things that are absolute constants in the world of software, they are these:
- Businesses change.
- Software doesn't.
It would probably be more accurate to say that, since at the end of the day the software in question m-u-s-t
somehow be caused to match the business (the software is, after all, much too expensive and much too business-critical to throw away ...), "it will be dragged, kicking and screaming, across the transom of change," and it will probably fall completely apart in the process.
When you are writing software... "please, don't be clever." Every time you avail yourself of features such as "friends," you are (whether you realize the long-term implications of your actions or not ...) creating a wicked and utterly intractable functional dependency between the two that one day just might be regarded as the relationship between Harry Potter and Lord Voldemort.
I'll step off my soapbox now. But please, mark my words. I've spent most of my thirty-plus year career
untangling what was once "clever" software. And sometimes it feels just like disarming a most-delicate bomb. The most noble of intentions, practiced by obviously skilled and knowledgeable
programmers, can nevertheless turn into ... scrap. And, if I may bluntly say so, "the more 'clever' it is, the more likely it is to be unsalvageable."
(And let no one call me a Luddite, because you would not know whereof you speak. Just sayin' ...)
The guy who runs the junk-yard does
have a valid opinion with regard to cars.