Languages for servers (Go, D, and more)
Dmitry Olshansky via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 4 13:41:43 PDT 2014
05-Jul-2014 00:25, Chris Cain пишет:
> On Friday, 4 July 2014 at 19:46:40 UTC, Remo wrote:
>> Who want to use C-style memory management today ?
>> How about C++ style memory management, is this easy to this in D2
>> now ?
>
> The big problem with that is "C++ style memory management" implies we're
> going to have new/delete which AFAIK delete is depreciated and new is
> currently hardcoded to use the GC.
>
Eh-m I guess it's more of automatic memory management like std::vector
and RAII in general. C++'s 'new' and 'delete' are not much more then
malloc/free repainted in pink (barring placement new, overloading).
D has had support for RAII for a long time, the only problem is
interaction with GC. Say in closures that contain structs with
destructors, the latter do not have their destructors run and because
the closure leaves in GC heap.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list