Thread overview
[Issue 21574] Evaluate pure functions using CTFE
Jan 23, 2021
Walter Bright
Jan 23, 2021
Dlang Bot
Dec 17, 2022
Iain Buclaw
Mar 02, 2023
Richard Cattermole
January 23, 2021
https://issues.dlang.org/show_bug.cgi?id=21574

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |later

--
January 23, 2021
https://issues.dlang.org/show_bug.cgi?id=21574

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot@dlang.rocks> ---
@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

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=21574

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
March 02, 2023
https://issues.dlang.org/show_bug.cgi?id=21574

Richard Cattermole <alphaglosined@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alphaglosined@gmail.com

--- Comment #2 from Richard Cattermole <alphaglosined@gmail.com> ---
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.

--