Thursday, August 6, 2009

C++ Templates and the Concepts feature

It's now been 10 years since I was a full-time C++ programmer, so I've been rather disconnected from the C++ world.

But I was recently drawn back in by all the excitement over the removal of the concepts feature from the upcoming new C++ standard.

When I was using C++ intensively, templates and the STL were just being invented, and while I thought they were fascinating, the compilers that we had access to at the time didn't support those features, so we didn't use them.

The feature of Java which is most similar to the templates feature of C++ is called generics, and has been part of Java for many years, introduced in JDK 1.5. I've used generics a fair amount, and whined about them somewhat, but overall I think that generics are a strong feature in Java.

C++ has always been a fascinating language. It is incredibly powerful, but it is also extremely hard to learn, and it is tricky to use it well. Languages like Java and C# seem to have been able to learn from C++, and to provide tremendous power with substantially less complexity.

However, I think it's good for the programming profession as a whole to have C++ out there exploring the nether regions, so we mere mortals can come along and learn from it. :)

No comments:

Post a Comment