Walter on Function Hijacking

October 18th, 2007 | by Aldacron |

Walter has posted an article on function hijacking, the subject of his presentation at the most recent Northwest C++ Users Group gathering:

As software becomes more complex, we become more reliant on module interfaces. An application may import and combine modules from multiple sources, including sources from outside the company. The module developers must be able to maintain and improve those modules without inadvertently stepping on the behavior of modules over which they cannot have knowledge of. The application developer needs to be notified if any module changes would break the application. This talk covers function hijacking, where adding innocent and reasonable declarations in a module can wreak arbitrary havoc on an application program in C++ and Java. We’ll then look at how modest language design changes can largely eliminate the problem in the D programming language.

In the article, he touches on the new Overload Sets feature recently added to the D 2.0 branch. He also gives a good example of the rationale behind hiding base class functions of the same name as those in a derived class, a feature Java programmers stumble over quite frequently when coming to D.

Technorati Tags: ,

Post a Comment