Passing lazy parmeters to functions that take lazy parameters
Unknown W. Brackets
unknown at simplemachines.org
Mon Sep 4 19:00:01 PDT 2006
Is it necessary to wrap it in another delegate?
Assuming it already has a delegate which returns int, it seems a
possible optimization to simply pass this existing delegate on, without
packaging it further...
Is that not the case, or simply a field for future optimization?
Thanks,
-[Unknown]
> Joe Gottman wrote:
>> Suppose I have a function f that has a lazy parameter x, and I pass it
>> into another function g that has a lazy parameter. Will x be
>> evaluated when it is passed to g?
>
> No, it isn't evaluated. The evaluation of it is wrapped up into another
> delegate and passed to g.
More information about the Digitalmars-d
mailing list