> In C++ you learn piles of caveats to the base language, "don't throw an exception from a constructor",
Nonsense.
> there's no way to prove a C++ compilation using templates will ever finish
Erm, except to maybe try compiling it. Templates are Turing complete, but in practice compilers have limits on how many levels of instantiations they'll handle and rapidly run out of memory (and crash) if you do something stupid/crazy.
And so what? Is the fact that there's no way to prove a C program will ever finish a practical problem? If not, why is the Turing completeness of templates a practical problem?
Posted Jul 4, 2012 12:39 UTC (Wed) by dgm (subscriber, #49227)
[Link]
>> In C++ you learn piles of caveats to the base language, "don't throw an exception from a constructor",
>Nonsense.
Maybe just misinformed. In fact, exceptions are the only way to propagate errors in constructors, you cannot return an error code. But I guess what he really meant was "destructor".