Program logic bugs vs input/environmental errors

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 10 02:26:28 PDT 2014


Am Wed, 08 Oct 2014 16:30:19 +0100
schrieb Bruno Medeiros <bruno.do.medeiros+dng at gmail.com>:

> I don't think memory-safety is at the core of the issue. Java is 
> memory-safe, yet if you encounter a null pointer exception, you're still 
> not sure if your whole application is now in an unusable state, or if 
> the NPE was just confined to say, the operation the user just tried to 
> do, or some other component of the application. There are no guarantees.

I know a Karaoke software written in .NET, that doesn't check
if a list view is empty when trying to select the first
element. It results in a popup message about the Exception and
you can continue from there.

It is a logic error (aka assertion), but being tailored
towards user interfaces, .NET doesn't kill the app.
Heck, if Mono-D closed down on every NPE I wouldn't be using
it any more. ;)

-- 
Marco



More information about the Digitalmars-d mailing list