[Semi OT] Language for Game Development talk

po via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 26 03:18:00 PDT 2014


«The technique was developed for exception-safe resource
> management in C++[3] during 1984–89»
>
> http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization

  It may have been developed for exceptions, that doesn't mean you 
have to use them together.

Alternative error reporting methods I prefer:
-return optional type, is empty if it failed
-accept continuation of what to do once operation secedes
   ie:
      open_file("blah.txt",
                [](file& f){..}}//called when it opened 
successfully
                //could also have a 2nd lambda for when it fails



More information about the Digitalmars-d mailing list