I come not to bury C++, but to praise it...

Derek none at none.com
Tue Jan 20 16:20:44 EST 2004


"Peter Hansen" wrote:
> > > A traceback is also much less nasty than deciphering a
> > > 1000-character long compiler error message reported in
> > > code that uses a heavily templated library.
> >
> > Absolutely correct.  But remember that ugly
> > template-related compiler error messages are a reflection
> > of current compiler technology, not a fundamental
> > limitation of C++.  I suspect future compilers will make
> > debugging templates much easier.
>
> I believe I heard that claim, almost verbatim, sometime
> I around the last time was actively using C++, which was
> I about a decade ago...

Hmmm.  As late as 1997 I couldn't get consistent template behavior
between BCC, GCC, and MSVC.  To this day most compilers are broken in
some way or other with respect to templates.  Even basic STL
containers like std::vector were often improperly implemented or
incomplete just a few years ago (try GCC 2.95 or VC6 to see what I
mean).  I also don't remember typelists, traits, policies, or other
modern template techniques being popular a decade ago.

My point is that while templates aren't new, their widespread use is.
I'm not surprised that compiler vendors are only now looking at ways
to improve template-related compiler errors.





More information about the Python-list mailing list