by summerlight · 1y ago · 0 comments
Only if you have full control on what others are writing. In reality, you're going to read a lot, lots of "clever" codes. And I'm saying as a person who have written a good amount of template meta programming codes. Even for me, some codes take hours to understand and I was usually able to cut 90% of its code after that.
Most templates are much easier to read in comparison.
With a pure virtual interface you can at least track down the execution path as long as you can spot down where the object is created, but with template black magics? Good luck. Static dispatch with all those type traits and SFINAE practically makes it impossible to know before running it. Concept was supposed to solve this but this won't automatically solve all those problems lurking in legacy codes.
Some lvalue move copy constructor double rainbow, and you’re left wondering wtf
Oh boy!
This person needs control.
That is where I left C++, a better C
Faint praise