Microsoft working on new systems language
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Mon Dec 30 22:28:38 PST 2013
On Tuesday, 31 December 2013 at 00:45:51 UTC, Adam D. Ruppe wrote:
> I really think the built-in new should be discouraged - it has
> a lot of disadvantages over using a library setup, and not many
> advantages.
A flexible new and good compiler level memory management support
that cannot be overridden gives the compiler some optimization
opportunities. E.g. putting objects on the stack, allocating a
single chunk for multiple objects, delaying init and perhaps
avoiding allocation.
So I am personally sceptical of pushing libraries over advanced
compiler support. Leaving more room for analysis is usually a
good thing. The issue I have with library level allocation is
that the compiler does not know that the code is doing allocation?
More information about the Digitalmars-d
mailing list