Bug 17979 – Improve documentation for lazy parameters

Status
NEW
Severity
enhancement
Priority
P4
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-11-12T16:58:21Z
Last change time
2024-12-15T15:24:27Z
Assigned to
No Owner
Creator
Alexey Kulentsov
Moved to GitHub: dlang.org#3967 →

Comments

Comment #0 by crimaniak — 2017-11-12T16:58:21Z
Lazy parameters in fact implemented using delegates and affect @nogc possibility. I propose additions to documentation: https://dlang.org/spec/function.html#parameters section It needs to write that the delegate is used, and explicitly document what exactly happens in the case of several occurrences of the used parameter - whether the delegate is called each time, or only the first, and then the returned value is used (affects non-pure lazy parameters). https://dlang.org/spec/garbage.html#op_involving_gc It will be useful to mention lazy parameters in this list too.
Comment #1 by robert.schadek — 2024-12-15T15:24:27Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dlang.org/issues/3967 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB