D plan to do RAII(Resource Acquisition Is Initialization)?

Olivier Pisano via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 21 10:30:17 PST 2015


On Saturday, 21 February 2015 at 10:06:26 UTC, FrankLike wrote:
> RAII(Resource Acquisition Is Initialization) is a good 
> thing,will D plan to do it?

It's already here :


import std.stdio;

struct Test
{
     ~this() { writeln("RAII"); }
}

void main()
{
      Test t; // prints "RAII" when goes out of scope
}


More information about the Digitalmars-d mailing list