3 ms·
To be honest C++-like templates are probably the worst way to do generics. C++ templates can provide you with the joy of debugging exceptions for which no sour
by stcredzero 8y ago
To be honest C++-like templates are probably the worst way to do generics.
C++ templates can provide you with the joy of debugging exceptions for which no source code exists! Been there. Done it for my job.
- naikrovek 8y agoIt exists, just temporarily and it's machine-written. C++ templates suck. They could have been tolerable but the way they are designed forces them to be awful. The people designing C++ either don't write code every day (too far away) or they do nothing but C++ every day (too close) and have become blind to better, non over-designed language feature implementations. It reminds me of the nonsense Java does that's clearly demonstrated in FizzBuzzEnterpriseEdition; a bunch of things that get in the way because one or more people were blinded by the language.
- stcredzero 8y agoIt exists, just temporarily and it's machine-written. The relevant point is that it may not be available for you at debug time. I know empirically that it can not be available, and the programmer will have to infer it by looking at the involved templates.
- lkschubert8 8y agoI dont think it's fair to say "Java does" because that can all be done in any OOP language. If anything it's more about people who over engineer.
- stcredzero 8y agoOr to be more succinct: If anything it's more about people. Extreme Programming took this into account. Left to their own devices, most coders tend to over engineer to impress their friends and coworkers.