On 05-09-2012 14:07, Benjamin Thaut wrote:
Am 05.09.2012 14:00, schrieb Alex Rønne Petersen:
 >
Sure, I just want to point out that it's a problem with the language (GC
allocations being very non-obvious) as opposed to the nature of GC.


Thats exactly what I want to cause with this post. More effort should be
put into the parts of D that currently allocate, but absolutley don't
have to. Also the statement "You can use D without a GC" is not quite as
easy as the homepage makes it sound.

Very true. I've often thought we should ship a GC-less druntime in the normal distribution.


My favorite hidden allocation so far is:

class A {}
class B : A{}

A a = new A();
B b = new B();

if(a == b) //this will allocate
{
}

Where's the catch? From looking in druntime, I don't see where the allocation could occur.


Kind Regards
Benjamin Thaut

--
Alex Rønne Petersen
a...@lycus.org
http://lycus.org

Reply via email to