[Issue 17979] New: Improve documentation for lazy parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 12 16:58:21 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17979
Issue ID: 17979
Summary: Improve documentation for lazy parameters
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: crimaniak at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list