Disable GC entirely

Paulo Pinto pjmlp at progtools.org
Sun Apr 7 14:11:37 PDT 2013


Am 07.04.2013 22:28, schrieb Timon Gehr:
> On 04/07/2013 12:59 PM, Paulo Pinto wrote:
>> ...
>>
>> The current compilers just don't have the amount of investment in more
>> than 20 years of code optimization like C++ has. You cannot expect to
>> achieve that from one moment to the other.
>> ...
>
> GDC certainly has. Parts of the runtime could use some investment.
>
>>
>> Nowadays the only place I do manual memory management is when writing
>> Assembly code.
>>
>
> I do not buy that. Maintaining mutable state is a form of manual memory
> management.
>

I don't follow that.

Since 2002 I don't write any C code, only C++, JVM and .NET languages.

While at CERN, my team (Atlas HLT) had a golden rule, new and delete 
were only allowed in library code. Application code had to rely in stl, 
boost or CERN libraries own allocation mechanisms.

Nowadays 100% of the C++ code I write makes use of reference counting.

In the last month I started to port a toy compiler done in '99 on my 
last university year from Java 1.1 to Java 7, while updating the 
generated Assembly code and C based run time library.

It is the first time since 2002, I care to write manual memory management.

Why should maintaining mutable state be like manual memory management, 
if you have in place the required GC/reference counter helpers?

--
Paulo


More information about the Digitalmars-d mailing list