Lazy evaluation of function arguments in D
Roman D. Boiko
rb at d-coding.com
Sat May 19 22:15:25 PDT 2012
On Sunday, 20 May 2012 at 00:26:14 UTC, Mehrdad wrote:
> +1 ^
>Yeah, I'd like both "lazy" and "ref" to be forced to be used
>from the call site >and not just in the declaration. I don't use
>lazy that often but I would use >'ref' more often if I could
>tell from the call site that my arguments might be >modified.
IMO requiring caller to specify ref, out or lazy would make D
programs more robust and easier to understand. And it is clearly
much easier, than, for example, would be repeating pure, nothrow,
safe, or even contracts at each call (any of these would not make
sence for me because they are enforced by the compiler).
Sorry if the above is confusing, I have difficulties to explain
it more clearly.
More information about the Digitalmars-d