Strings in C++ in 2004.

I wonder how many people are dealing with Strings today. How many programmers are stuck because they have one library using a std::string, another using an ATL::CString, and a third using a MFC::CString? Or maybe you are trying to interface to a BSTR? how about a LPWSTR? or even a plain old char *? Maybe you’ve got your own whiz-bang String class that’s even better….

As software designers in C++, we’ve just unequivocally and totally failed. C++ was heralded as the object oriented language to bring us interoperability and code reuse. Say what? How can we even fantasize about being interoperable when we can’t even agree on how to format a string?

I think Java and C# have two major advantages. One is garbage collection, and the second is a standard definition of strings.

How is it that here in 2004, we can’t figure out how to put an array of characters together in a way that works in all languages, and is interoperable with other programs? This is absolutely ridiculous.

Of course this is all well known and has been for years. As a struggling programmer sent back to the dark ages of C++ after having been spoiled by managed code, it just gets me particularly grumpy.