D on next-gen consoles and for game development

QAston qaston at gmail.com
Thu May 23 13:15:50 PDT 2013


On Thursday, 23 May 2013 at 20:07:08 UTC, Steven Schveighoffer 
wrote:
> While I'm not specifically addressing the ability or not to 
> disable the GC (I agree D has problems tehre), deprecating the 
> delete operator does NOT preclude manual memory management.
>
> The problem with delete is it conflates destruction with 
> deallocation.  Yes, when you deallocate, you want to destroy, 
> but manual deallocation is a very dangerous operation.  Most of 
> the time, you want to destroy WITHOUT deallocating (this is for 
> cases where you are relying on the GC).
>
> Then I think Andrei also had a gripe that D had a whole keyword 
> dedicated to an unsafe operation.
>
> You can still destroy and deallocate with destroy() and 
> GC.free().
>
> -Steve

Yes, I know the rationale behind deprecating delete and i agree 
with it. But from newcomer's point of view this looks misleading 
- not everyone has enough patience (or hatered towards c++) to 
lurk inside mailing lists and official website shows the 
deprecated way of doing things: http://dlang.org/memory.html . 
IMO manual memory management howto should be in a visible place - 
to dispell the myths language suffers from. Maybe even place in 
to the malloc-howto in Efficency paragraph of main website.


More information about the Digitalmars-d mailing list