DMD 0.166 release

Walter Bright newshound at digitalmars.com
Thu Aug 31 18:57:42 PDT 2006


Russ Lewis wrote:
> Ah, I was wondering if that was what you meant.  What I was suggesting 
> was that the code
>     lazy x+y
> would just be syntax sugar for
>     delegate int() { return x+y; }
> 
> So, to expand on the previous example:
>   void foo(int delegate() dg) {...}
>   void foo(int i) {...}
>   void bar(int x,int y) {
>     foo(lazy x+y); // calls delegate version
>     foo(x+y);      // calls int version
>   }

Ok, that can work. But I don't see an application for it.



More information about the Digitalmars-d-announce mailing list