Why C++ sucks. Part 3474.

OK, so it appears some people took my
previous post the wrong way. I am guilty of not putting down my actual
thoughts in the post and of being far from subtle in my title.

The point was meant to be that a C++ compiler has to put arbitrary
limits on the code it can compile because it runs a program during
compilation
. This follows from both resource limitations and the halting
problem. I have been informed that the template recursion limit is in
the C++ spec, which is hardly surprising given there are few better
solutions than “kill the program if it runs too long”.

A better example might have been Ackermann’s function or another
fast-growing recursive function. Simple infinite loops don’t prove
much, but they’re easy for me to write.

Finally I should say that I wasn’t even thinking about KDE at the
time I wrote the original entry. It wasn’t a dig at you guys.


Posted

in

by

Tags: