dynamic classes and duck typing

Walter Bright newshound1 at digitalmars.com
Tue Dec 1 11:04:07 PST 2009


Lutger wrote:
> In javascript I understand it is like this:
> 
> void yourMagicJavascriptFunction(T d)
> {
>    d.foo(); // rewritten as d["foo"]
> }

d.foo is rewritten as d["foo"],

d.foo() is rewritten as d["foo"]()



More information about the Digitalmars-d mailing list