Zig vs D generics
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Oct 10 09:55:32 UTC 2022
On Monday, 10 October 2022 at 07:30:38 UTC, Kagamin wrote:
> Eh? So can C++ support an allocator that works both at compile
> time and at run time? I use such allocator in my D code so it's
> ctfeable.
No, only encapsulated types can hold memory. This is the right
approach when you don't have garbage collection. If you allow
manual compile time allocation you end up with something that
doesn't scale in terms of debugging.
Or you need a very advanced debugger.
More information about the Digitalmars-d
mailing list