Dispatches from Maine

Just another person of little note writing about ordinary things. That I reside in Maine is icing on the cake.

12 September 2005

PDC05: Day Two (C++/CLI Object Model Intro)

Stanley Lippman (blog) once again opened the C++ pre-conference session by leading us on a historical tour of the C++ Object Model. He contrasted the two original styles of vtbl architectures: STVM (Stroustrup) and KVTM (Kay). The former style uses the familiar static dispatch of C++, while the latter uses the dynamic dispatch of languages like Smalltalk and Objective-C. Lippman did a good job of being both informative and entertaining using the line "Well, I won't event get into it." whenever he was about to say something he ought not.

The need to support C++/CLI required the team to use a new dispatching system (SVTM or Stub VTbl Model), which we will learn more about later today. The next decision for the team was how to integrate the new CLI references into C++. For designating that typename T is a reference, they saw three possible options:
  • Use the normal T* type
    This option appeared to create more problems than it solved. For instance, what would T** mean in that context?
  • Create a a library to support CLI types
    This was the tradition C++ answer from the old Bell Labs days
  • Change the language and add a new symbol
    This is the option they selected and created the new symbol T^ (called a "hat") representing a pointer-style reference and T% (what is this called?) representing a C++ reference-style reference. Remember that a C++ reference cannot be NULL and cannot be changed once set.
They immediately started taking flack for destroying C++ and damaging the language. Lippman recognizes this criticism and accepts it, but noted that C++ is not sacrosanct, it is a simple invention so it should be changable at any point. He also remarked that there have been several paradigm shifts in C++'s history:
  • 1988 - multiple inheretance
  • 1991 - generic programming
  • 1996 - ISO C++
  • 2005 - dynamic programming (C++/CLR)
From here we jumped off into a history of the evolution of the C++ object model and Lippman's work with Bjarne Stroustrup at Bell Labs (Area 11 in Murray Hill). The C++ object model project was originally called "the simplifier" by Stroustrup, but Lippman renamed it "C++ object model" so he would be able to sell his book, "Inside the C++ Object Model," to Addison-Wesley. By this time the talk was somewhere more than thirty minutes past its time slot and Lippman simply stopped in the middle of the slide and handed the show over to Jim Hogg.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home