Lazy eval

Walter Bright newshound at digitalmars.com
Mon Aug 21 21:17:01 PDT 2006


kris wrote:
>> C++ programmers have been trying to do this for over a decade - first 
>> with preprocessor macros, and now with expression templates.
> Eh. Callbacks have been around for decades. Syntax to support that is 
> good or bad depending upon language you choose.

I wasn't thinking of callbacks. Take a look at the common practice:

#define log_printf  if (logging) printf e;

and the endless variations on it, all trying to do lazy evaluation of e. 
Expression templates are just the latest method.



More information about the Digitalmars-d mailing list