[Semi OT] Language for Game Development talk

via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 27 03:01:04 PDT 2014


On Friday, 26 September 2014 at 21:19:29 UTC, Walter Bright wrote:
> I would. The whole point of destructors is to automatically 
> clean up resources when the object goes away, which was (later) 
> dubbed RAII.

Yeah, but RAII takes it to the extreme where you create dummy 
classes that only consist of constructors/destructors so that the 
stack unwinding does all cleanup/closing/freeing without any 
try/catch.

Before C++ templates that looked verbose and ugly syntactically, 
and it is still tedious if you only use the specific resource in 
one location.  "scope(exit)" is often more transparent IMO.


More information about the Digitalmars-d mailing list