D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17979 - Improve documentation for lazy parameters
Summary: Improve documentation for lazy parameters
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-12 16:58 UTC by Alexey Kulentsov
Modified: 2024-12-15 15:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Alexey Kulentsov 2017-11-12 16:58:21 UTC
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 dlangBugzillaToGithub 2024-12-15 15:24:27 UTC
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