Program logic bugs vs input/environmental errors

Brad Roberts via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 10 11:53:14 PDT 2014


On 10/10/2014 2:26 AM, Marco Leise via Digitalmars-d wrote:
> 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. ;)

How much you want to bet that if it did exit the app, that the bug would 
actually have been addressed rather than still remain broken?


More information about the Digitalmars-d mailing list