D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13643 - memoize lazy parameter evaluation
Summary: memoize lazy parameter evaluation
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-21 10:56 UTC by Martin Nowak
Modified: 2024-12-13 18:32 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 Martin Nowak 2014-10-21 10:56:54 UTC
Currently D's lazy parameters use call-by-name, i.e. the expression is evaluated whenever referenced. Historically lazy refers to call-by-need evaluation where the result is cached on first use.
http://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_name

We could at least do it for pure expressions that are referenced multiple times.
Comment 1 dlangBugzillaToGithub 2024-12-13 18:32:07 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17686

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB