Fully dynamic d by opDotExp overloading

Don nospam at nospam.com
Thu Apr 16 23:52:30 PDT 2009


davidl wrote:
> After tweaking dmd a bit litte, i get the dotexp overloading work.
> 
> class c
> {
> 
>     B opDotExp(char[] methodname,...)
>     {
>         writefln("god it works ", methodname);
>       return new B();
>     }

> it generates the output:
> god it works dynamicmethod
> god it works qq
> 5
> 
> Any comments? Do you like this feature?

That's very impressive. How did you do it? Are the syntax and semantic 
passes still independent?



More information about the Digitalmars-d mailing list