[Issue 21574] Evaluate pure functions using CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 2 14:07:28 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=21574

Richard Cattermole <alphaglosined at gmail.com> changed:

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

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

--


More information about the Digitalmars-d-bugs mailing list