Right now, what's the most important for the success and adoption of D?
Patrick Kreft
patrick_kreft at gmx.net
Sat Sep 29 02:18:07 PDT 2007
downs schrieb:
> Max Samukha wrote:
>> 1. More bugfixes in D 1.0. I would be happy to call it stable some
>> day.
>> 2. The problem with RAII (destructors are useless:
>> http://www.digitalmars.com/d/archives/digitalmars/D/learn/destructors_7525.html
>> and other threads)
>> 3. GUI
>
> Seconded, especially the first. And the second. Third would be nice too :)
> --downs
Hmm Second isnt an issue. I think it was misunderstood. Yeah D have GC
and RAII, that means that u can explicit call a destructor and this will
be executed.
That is why Sun think about RAII in Java and C++ get GC in C++0x or
maybe not.
Look:
import std.stdio;
import std.thread;
class Type
{
this()
{
writefln("Create");
}
~this()
{
writefln("Delete");
}
}
int ThreadLoop()
{
int i;
Type t;
while(i < 1000)
{
writefln(i);
if(i == 0)
{
t = new Type();
}
if(i == 500)
{
delete t;
}
i++;
}
return 0;
}
void main()
{
auto t = new Thread(ThreadLoop);
}
Type is delete ever if i = 500;
More information about the Digitalmars-d
mailing list