lazy redux

ZY.Zhou rinick at goozo.net
Sun Dec 6 05:43:57 PST 2009


Andrei Alexandrescu Wrote:
> Should we sack lazy? I'd like it to have a reasonable replacement. Ideas 
> are welcome!

Once I had a bug, it's like:
   foo(step1());
   step2();
I forget foo() uses lazy parameter, so step1 never get called.

Now I prefer to use delegate, I just hope this can compile:
  void foo(int delegate() dg){}
  foo({step1()});




More information about the Digitalmars-d mailing list