Bug 21574 – Evaluate pure functions using CTFE

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-01-23T07:51:41Z
Last change time
2024-12-13T19:14:16Z
Keywords
later, pull
Assigned to
No Owner
Creator
Walter Bright
Moved to GitHub: dmd#19860 →

Comments

Comment #0 by bugzilla — 2021-01-23T07:51:41Z
Comment #1 by dlang-bot — 2021-01-23T07:53:25Z
@WalterBright updated dlang/dmd pull request #10452 "fix Issue 21574 Evaluate Pure Functions With CTFE" fixing this issue: - fix Issue 21574 Evaluate Pure Functions With CTFE https://github.com/dlang/dmd/pull/10452
Comment #2 by alphaglosined — 2023-03-02T14:07:28Z
This is a good idea, except it shouldn't be done blindly. Some functions like std.regex : regex, can be quite slow to run at CTFE, so this needs to be able to be done lazily rather than eagerly. Hundreds of milliseconds add up pretty fast. A UDA in core.attributes would be a good solution to this.
Comment #3 by robert.schadek — 2024-12-13T19:14:16Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19860 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB