Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for lazy parameters #3967

Open
dlangBugzillaToGithub opened this issue Nov 12, 2017 · 0 comments
Open

Improve documentation for lazy parameters #3967

dlangBugzillaToGithub opened this issue Nov 12, 2017 · 0 comments

Comments

@dlangBugzillaToGithub
Copy link

Alexey Kulentsov (@crimaniak) reported this on 2017-11-12T16:58:21Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=17979

Description

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant