[Semi OT] Language for Game Development talk

po via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 26 02:42:13 PDT 2014


> Just a note: this isn't really true. RAII was initially used to 
> deal with exceptions. If you want fast backtracking and just 
> reset the stack pointer (rather than unwinding) then 
> stack-allocated RAII objects won't work since they will be 
> overwritten. You need to maintain a list of "destructors" in 
> thread local memory or close to the stack root so that you can 
> close files etc. Whether RAII is the best option really depends 
> on what kind of execution patterns and performance 
> characteristics you are aiming for.

  Why would you reset the stack pointer? Keep in mind, nobody uses 
exceptions in games. No exceptions are going to be thrown in a 
game context.



More information about the Digitalmars-d mailing list