Tom St Denis wrote:
J.C. Pizarro wrote:
A) When they are using "nested" templates.
B) When there are "cyclic" dependences of compilation beetwen 2 or
more files.
C) When there are "overloading" of methods and functions, virtual and
non-virtual.
D) When there are macros in C++.
E) When there are __atributes__ in C++.
Without turning this into (too much of) a language war. No, because I
write maintainable easy to read C programs (which through structs get
the benefits of anonymous implementations of interfaces).
I want to supplement this with saying that just because a language
supports something doesn't mean you should use it. Templates often from
what I see are wholesale abused. I can't imagine a case where a
template makes sense. If I'm writing a math library for instance, to do
FFTs, I'd use a typedef to allow switching from float/double. Yes, I
can see how a template would allow at compile time to instantiate a
different flavour of the code, but honestly, I'd just build two copies
if I needed that flexibility in my system (since really that's what you
end up with anyways).
Just like C's bitfields. I have never, in my 14 years as a
student/hobbiest/professional ever used a bitfield. And I've done quite
a bit [hahahaha punny] of MCU programming.
Sometimes the "hard way" isn't so hard and just as simple.