new should lower to a template function call
Steven Schveighoffer
schveiguy at gmail.com
Fri Jul 24 14:38:10 UTC 2020
On 7/24/20 10:06 AM, Andrei Alexandrescu wrote:
> We need to template all we can of druntime. All those silly C-style
> functions decaying to void* and dependencies and runtime type
> information must go.
Yes please! Template implementations make bugs in the runtime so much
easier to fix, and make features easier to add. Not to mention all the
inference we lose when we don't do it this way.
Consider all the features added to AAs via templates. Even though they
have to be thin wrappers around the C-style functions, it allows much
better control over which calls are valid.
-Steve
More information about the Digitalmars-d
mailing list