Discussion about D at a C++ forum

Jonathan M Davis jmdavisProg at gmx.com
Mon Jan 9 01:02:33 PST 2012


On Monday, January 09, 2012 00:51:57 Mehrdad wrote:
> On 1/8/2012 7:09 PM, Vladimir Panteleev wrote:
> > On Sunday, 8 January 2012 at 23:28:57 UTC, Mehrdad wrote:
> >> 7. Unstable language. They're currently considering doing things like
> >> removing "delete" as it's apparently deprecated (which will
> >> officially make it not usable as an SP language).
> >> 
> >>   Looks 100% correct. Removing 'delete' /does/ make D unusable as an
> >> 
> >> SP language... unless you ignore the GC completely, which isn't even
> >> possible, practically speaking.
> > 
> > I don't understand how you came to that conclusion? "delete" will
> > become a standard library (or easily-implemented user) function.
> 
> Would it still have the same functionality (i.e. disposing of GC'd
> objects and reclaiming their memory, as though the GC had done it)?
> If so, what's the point of removing it in the first place?
> If not, then I guess my point is obvious.

I believe that the general idea is that if you want to manually manage memory, 
then you don't use the GC heap, though core.memory.GC will still allow some 
level of manual control for the GC. I'm not aware of any plan to add a 
"delete" function to anything, but if something like that is added, it'll 
probably be to core.memory with the idea that it's there if you really need it 
but that you really shouldn't be using it normally. Explicitly freeing memory 
goes with manually memory management, not garbage collection.

- Jonathan M Davis


More information about the Digitalmars-d mailing list