Program logic bugs vs input/environmental errors

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 7 12:44:20 PDT 2014


On 10/07/2014 09:26 PM, Walter Bright wrote:
> On 10/7/2014 6:56 AM, Timon Gehr wrote:
>> On 10/06/2014 01:01 AM, Walter Bright wrote:
>>> Relying on program state after entering an unknown state is undefined by
>>> definition.
>>
>> What definition?
>
> How can one define the behavior of an unknown state?
>

Well, how do you define the behaviour of a program that will be fed an 
unknown input? That way.

I don't really understand what this question is trying to get at. Just 
define the language semantics appropriately.

Your reasoning usually goes like

a certain kind of event you assume to be bad -> bug -> unknown state -> 
undefined behaviour.

Why does this apply to D and not to e.g. Java?


More information about the Digitalmars-d mailing list