betterC and CTFE
Walter Bright
newshound2 at digitalmars.com
Sat Jan 7 02:09:00 UTC 2023
BetterC code does not have a GC, and so doesn't allow using the GC. But many
have correctly pointed out that not having a GC cripples CTFE. CTFE should be
able to use the GC, it's a major advantage of having a GC (and cripples
languages with CTFE that don't have GC).
So, making some experiments, I found it usually worked. Searching bugzilla, I
found one case that didn't:
https://issues.dlang.org/show_bug.cgi?id=20101
and fixed it:
https://github.com/dlang/dmd/pull/14789
For those that still suffer the slings and arrows from this problem, please let
me know the bugzilla issues for them.
P.S. This also applies to @nogc code - CTFE should still be able to use the GC.
Isn't that cool? Destroy the question "what good a GC is in a systems
programming language!"
More information about the Digitalmars-d
mailing list