scope() statements and return

Ola Fosheim Grostad via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 5 23:06:34 PDT 2014


On Monday, 6 October 2014 at 00:29:20 UTC, deadalnix wrote:
> I know of several cases where this trick was used and it turned 
> out horribly wrong. OOE is NOT recoverable. It may be in some 
> cases, and you can use trick to make them recoverable in more 
> cases, like the one mentioned, but ultimately, you have no 
> guarantee, and worse, no way to know if you are in a 
> recoverable situation or not.

You can throw a fatal error if you run out of memory twice. You 
have to write code that take low memory conditions into account 
throughout.

The problem is not that it is impossible to recover, the problem 
is that virtual memory have made programmers sloppy.



More information about the Digitalmars-d mailing list