On Monday, 5 August 2013 at 13:42:01 UTC, Michal Minich wrote:
But what Bosak proposes is that when "with" statements ends, the object should be destructed
That would happen if the object is a struct, or wrapped in a struct, since it would go out of scope at the end of the with and call its destructor then.
So then you could just go import std.typecons; with(auto a = Scoped!T()) { ... } and the Scoped destructor does the deleting.