lazy variables cannot be lvalues - why?
smjg_1998 at yahoo.com
Mon Nov 1 10:17:24 PDT 2010
On 01/11/2010 16:20, Jonathan M Davis wrote:
> 1. I 'm stunned that the compiler doesn't complain about you declaring f as
> void. It strikes me as a bug with lazy. You can't declare variables of type
> void. It makes no sense.
It isn't a bug. Read the documentation on lazy - D explicitly supports
it. It's a way of accepting an arbitrary expression as a function
parameter and then controlling when and how often that expression is
More information about the Digitalmars-d-learn