On Sunday, 20 May 2012 at 00:26:14 UTC, Mehrdad wrote:
http://www.reddit.com/r/programming/comments/tui75/lazy_evaluation_of_function_arguments_in_d/c4pwvyp

+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.

Reply via email to