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

Andrei

According to the doc page: http://www.digitalmars.com/d/2.0/lazy-evaluation.html you (and/or Tomasz Stachowiak) were the one who suggested it in the first place. How'd it go for you? :)

In haskell land they love lazy evaluation. Lazy evaluation can have many advantages but depending on the situation can be wrote using alternates that d provides:

mixins -- allows turning a string into expression at a later time
delegates -- only called when used explicitly
logical ('&&' and '||') operators already only evaluate what is needed

If it stays though I would prefer a different syntax so where we already have:

char[] delegate() dg
char[] function() fp

then something like this would be more consistent and intuitive:

char[] expression exp

rather than the current:

lazy char[] exp


Reply via email to