[nomenclature] systems language

Denis Koroskin 2korden at gmail.com
Sat Oct 16 20:33:17 PDT 2010


On Sun, 17 Oct 2010 07:22:46 +0400, Steven Wawryk <stevenw at acres.com.au>  
wrote:

> dsimcha wrote:
>> == Quote from Steven Wawryk (stevenw at acres.com.au)'s article
>>
>>> C and C++ qualify.  I'm new to D and still learning about it, but with
>>> the deprecation of scoped classes and delete, I'm not sure that D  
>>> qualifies.
>>  Why?  The elimination of scope and delete just serves to uglyify the  
>> relevant
>> concepts (which are unsafe and infrequently used) and save keywords.   
>> The concepts
>> can still be expressed:
>>  scope T -> std.typecons.scoped!T
>
> Good - ugly is better than nothing.  Can this be used for class members  
> of struct's too?
>
>
>> delete foo -> foo.__dtor();  GC.free(cast(void*) foo);
>
> If I wrote my own minimal run-time with no garbage collector I guess  
> GC.free would be replaced by my own memory manager's free function. Does  
> D allow me to hook my own allocation function into new?

New uses gc_malloc under the hood, override it and you should be fine.


More information about the Digitalmars-d mailing list