Back to TOC Departments


Editor's Forum


Now that the C++ Final Draft International Standard (FDIS) has been released, I guess it's safe to talk about some of the things that didn't quite make it into the Standard. These were features submitted by a contingent of committee members primarily concerned with enterprise computing. Unfortunately for them, they proposed their additions too late to be seriously considered by the standards committee in this iteration. But sufficient public support might help these proposals make it into the next version of the Standard, albeit many years from now. So here they are for your consideration:

  • Another new-style cast operator:
  • void out_cast<T>(const U &u);
    

    Intended as a companion to the relatively new static_cast, dynamic_cast, and friends, out_cast would cast the object u out of process scope, rendering it inaccessible to other program entities from that point forward. It was seen as a quick way to eliminate corrupted business objects, as in:

    Manager m;
    //... m does something questionable
    out_cast<int>(m); // he's outta here!
    
  • New facets. The Enterprise Contingent, as they came to be known, made a strong case that programming in a corporate environment was in many ways equivalent to the daunting task of internationalization. Thus, they proposed that the Standard include two new internationalization facets, corporate_put and corporate_get. (For an explanation of C++ locales and facets, see ``Internationalization Using Standard C++,'' by Angelika Langer and Klaus Kreft, CUJ, September 1997.)
  • When a program was imbued with the corporate_put facet, an inserter would translate strings from a process environment to a corporate environment. For example, the line:

    cout << "The project was a total disaster." << endl;
    

    would cause the console to print:

    More research is required before conformance of the project to stated objectives
    can be assessed.
    

    Likewise, the corporate_get facet would facilitate translation of strings from the corporate environment to the process environment. For example, when a program was imbued with the corporate_get facet, its extractors would translate the string:

    To help recoup losses incurred in the recent acquisition, some adjustment in
    employment levels may be expected.
    

    to:

    We hear that McDonald's is hiring.
    

    Although it's taken a good eight years to get the C++ Standard to FDIS stage, some members of the Enterprise Contingent feel that the standardization committee passed over their proposals too quickly. "They're just no fun anymore," said one disgruntled member. Personally, I think it's high time we thanked the Standards Committee for a job well done. However, if you want to lend your support to the Enterprise Contingent, you can do so by visiting the their website: http://www.april\\fools!.com.

    Marc Briand
    Editor-in-Chief