D on next-gen consoles and for game development
Steven Schveighoffer
schveiguy at yahoo.com
Thu May 23 13:07:06 PDT 2013
On Thu, 23 May 2013 16:02:05 -0400, QAston <qaston at gmail.com> wrote:
> Also, it should be visible in C++/D that D can really deal with manual
> memory management conveniently - when I checked out Dlang first time I
> felt very disappointed that "delete" operator is deprecated. "So - they
> advertise one can code without GC, yet they seem to deprecate the
> operator" - false claims discourage people from using new languages.
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
More information about the Digitalmars-d
mailing list