Free functions versus member functions

Walter Bright newshound1 at digitalmars.com
Wed Oct 10 19:42:48 PDT 2007


Bill Baxter wrote:
>  From the fine article:
> """
> Herb Sutter has explained that the "interface" to a class (roughly 
> speaking, the functionality provided by the class) includes the 
> non-member functions related to the class, and he's shown that the name 
> lookup rules of C++ support this meaning of "interface" [7,8].
> """
> 
> Do D's name lookup rules similarly support that meaning of "interface"?
> (I'm not sure what the Herb was talking about but I'm guessing he meant 
> things like preferring the most-derived type for overloads and argument 
> dependent lookup.)

I think Herb was talking about ADL. D doesn't have ADL, but the next 
update will include "overload sets" which, although very different, 
accomplish the same thing.



More information about the Digitalmars-d mailing list