Fully dynamic d by opDotExp overloading

Walter Bright newshound1 at digitalmars.com
Sat Nov 28 20:32:03 PST 2009


bearophile wrote:
> Can someone show me a small example of how to use it with runtime method names?

class C
{
     void dynamic(string s, int i)
     {
          ...
     }

     void opDispatch(string s)(int i)
     {
	dynamic(s, i);
     }
}



More information about the Digitalmars-d mailing list