N
Noah Roberts
Tony said:Not an asset, IMO. Pretty much a language on it's own. It reminds me
of the column in a programming magazine: "Obfuscated C" where the
goal was (I think) to write the most undecipheral code snippet. Doing
unusual things with templates may be interesting or fun but probably
doesn't belong in general coding practices. How much undecipherable
code can one have before it becomes overwhelmingly unmaintainable?
I want to see code that I can understand what it is doing without having
to go investigate the tiniest of idiosyncracy of template machinery.
You and I have different views of the STL. I see the STL as a black
box into which I send things and get things back. I don't particularly
care how it does those things. What I find interesting about the STL
is the public interface. From a generic programming viewpoint the STL
is an amazing piece of work that has an interface that is fairly easy
to use for most purposes and can be implemented on numerous
architectures.
When I do have to look inside the STL because something I have done
wrong traces into an STL container I don't find the code there
particularly difficult or even that interesting or groundbreaking. If
you want interesting things to do with templates look at MPL, Spirit,
and boost::bind/boost::function. Yes, those thing definately do have a
place in general coding practices...they allow you to create very
powerful tools that are easy to USE (if not easy to understand or
implement).
Spirit is one great example of such work. Spirit is easy to use and
makes developing parsers a breeze...but no way would I step into it
trying to figure out how it works...I don't need to know how it does
what it does to use it.