manual memory management

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Mon Jan 7 09:44:24 PST 2013


On Mon, Jan 7, 2013 at 8:55 PM, Rob T <rob at ucora.com> wrote:

> On Monday, 7 January 2013 at 16:12:22 UTC, mist wrote:
>
>> How is D manual memory management any worse than plain C one?
>> Plenty of language features depend on GC but stuff that is left can
>> hardly be named "a lousy excuse". It lacks some convenience and guidelines
>> based on practical experience but it is already as capable as some of
>> wide-spread solutions for systems programming (C). In fact I'd be much more
>> afraid of runtime issues when doing system stuff than GC ones.
>>
>
> I think the point being made was that built in language features should
> not be dependent on the need for a GC because it means that you cannot
> fully use the language without a GC present and active. We can perhaps
> excuse the std library, but certainly not the language itself, because the
> claim is made that D's GC is fully optional.
>
> --rt
>


You're absolutely right. D would be far better if there was a way to
specify  custom allocators for built-in data structures. Perhaps another
magical property:

int[int] a;
a.allocator = new MyCustomAllocator;
a[5] = 5;

That's the least code-breaking way I can think of.

-- 
Bye,
Gor Gyolchanyan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130107/f29efd85/attachment.html>


More information about the Digitalmars-d mailing list