[Issue 6942] lazy parameters can break purity

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 2 18:57:21 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6942


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2011-12-02 18:56:15 PST ---
The pureness of lazy parameter belongs to the *caller side*, not callee side.
It is a design.

One use case is std.exception.enforce. It receives a condition as a lazy
parameter, but whole enforce function can become pure with the design.

Delegate parameter is similar to lazy parameter, but it is different in this
point.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list