Microsoft working on new systems language

Walter Bright newshound2 at digitalmars.com
Mon Dec 30 13:21:07 PST 2013


On 12/30/2013 11:39 AM, "Ola Fosheim Grøstad" 
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> On Monday, 30 December 2013 at 19:12:16 UTC, Walter Bright wrote::
>> Having overloaded global operator new in C++ myself across many projects, I
>> eventually concluded that feature is a bug.
>
> I guess it can go wrong if you end up using the wrong pool in different parts of
> your code when making calls across compilation units (or inlined functions), but
> if you stay within an encapsulated framework I would think it is safe?

It causes problems when linking in code developed elsewhere that makes 
assumptions about new's behavior.

Even if you wrote all the code, it suffers from the usual problems of using 
global variables to set global state that various parts of the code rely on, 
i.e. encapsulation failure.

This is why D does not support the notion.


More information about the Digitalmars-d mailing list