The Code Project – Member Function Pointers and the Fastest Possible C++ Delegates

This article gives an awesome breakdown of member pointers and delegates. apparently the delegate implementation from Boost is going to make it into the next c++ standard and that means we could be just a few steps away from actual compiler implementation support in the language. Yet another Delphi/.net goodie that can be brought back to good old c++.

The Code Project – Member Function Pointers and the Fastest Possible C++ Delegates – C++ / MFC

This is similar in concept to my blog on using templates to bring properties into standard c++ and the concept of possibly introducing optional garbage collection in the next standard. If standard c++ can keep up with the paces it might be able to stick around for a long time.

The one thing it should also optionally support is using meta-data files (like .net) instead of or with header files. In a world where most of the times #defines are excluded and headers consist of nothing but classes the removal of the need to build time-consuming header files would be a welcome advantage. I do really think a large percentage of .net concepts graft well back onto standard c++ and I’d love to see things move in that direction. Optional features with minimal performance impact is what it’s all about. While I’m dreaming having debug stl bounds checking couldn’t hurt either as well as a compiler option that allowed you to make certain constructs illegal for build (deprecate ugly language features — style guide type behavior enforced by the compiler).

We can dream:)

Leave a Reply