2 ms·
If i’m missing something obvious, please explain to me how using any of the C++ concepts made the code any better. You have to keep in mind that this is a very
by dreta 10y ago
If i’m missing something obvious, please explain to me how using any of the C++ concepts made the code any better.
You have to keep in mind that this is a very simple piece of software. I wager you that using things like templates made the code unnecessarily harder to understand. I’ll also wager that by using templates he made the code harder to scale, since any remotely complex template, just like an overused base class, eventually becomes a set of special cases, or a set of specialised templates which defeats their purpose in the first place, and makes your code a nightmare to step through.
This is a typical example presented in a talk. It doesn’t reflect any large real-world software, where complex language solutions (useful ones, not the ones in C++) could actually benefit the programmer.