A D vs. Rust example
Walter Bright
newshound2 at digitalmars.com
Fri Oct 28 04:22:56 UTC 2022
On 10/27/2022 4:51 PM, rikki cattermole wrote:
> On 28/10/2022 12:40 PM, Walter Bright wrote:
>> After all, whatcha gonna do with malloc/free in CTFE?
>
> Allocate and free memory?
I meant this at a more meta level - people write their own allocators a lot.
> CTFE is just an application VM, even if we have limitations, they are not
> inherent to the theory ;)
Yes, it is technically possible. But there's no actual purpose to malloc/free in
CTFE. The GC works just fine, and it's memory safe, and it's much more convenient.
More information about the Digitalmars-d
mailing list