Microsoft working on new systems language

Chris Cain clcain at uncg.edu
Mon Dec 30 17:45:10 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.

Huuuge +1 from me. A while ago, I heard someone state that 
allocation and object construction should be separate concepts 
and "new" kind of clobbers the two concepts together. Over time 
I've started recognizing that this as well and I've really 
started thinking that a "new" operator is actually a bad thing, 
despite it being a short and convenient way to do that process.

Once you start thinking of allocators as "objects" you start 
realizing that using the "new" operator is like you've been using 
global variables all over the place (which isn't necessarily a 
bad thing, but it's pretty shocking that no one really made the 
conscious choice to do so and most languages have made the choice 
too transparent when it actually matters quite a lot).


More information about the Digitalmars-d mailing list