'idiomatic' porting of c and or c++ code that does NULL checking

eles via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 26 22:45:33 PDT 2014


On Wednesday, 27 August 2014 at 05:39:59 UTC, Vladimir Panteleev 
wrote:
> On Monday, 25 August 2014 at 03:19:09 UTC, Mike Parker wrote:

>
> Sorry, you're right, that description of Exception/Error is 
> correct. But I don't think that SDL initialization is a 
> non-recoverable error. The program might want to retry SDL 
> initialization with different parameters

While this may be true in this case, I think that, in general, 
you cannot draw such a clear line between what's recoverable and 
what's not. If you really want to push things to the extreme, the 
sole unrecoverable error shall be assertion failure and the 
SIGKILL.

Everything else could be otherwise handled, even if for that 
you'd need to program a new operating system inside your program, 
just because the one that intend to use is missing ;)

No, that's extreme. But, matter is, what is recoverable and what 
not, is a matter of what the architect (and the specification) 
decide to be.


More information about the Digitalmars-d-learn mailing list