From: Georg Bauhaus on
On 07.06.10 16:51, Dmitry A. Kazakov wrote:
> On Mon, 07 Jun 2010 16:12:38 +0200, Georg Bauhaus wrote:
>
>> On 07.06.10 14:22, Dmitry A. Kazakov wrote:
>
>>> This includes the exceptional ones. When bug
>>> happens, the program is in no state.
>>
>> Erh, are you sure?
>
> Yes I am. Any program state is defined, it has some sematic interpretation
> in the domain. Bug is when you have lost this synchronization. Meaningless
> state is no state.

Then what constitutes a bug?

procedure add_to_account(Number: in out Account_ID; sum: Money) is
client_account: Account := Find_Account(Number);
begin
-- FIXME: not ready, using dummy account
client_account := Make_new_Account;
end add_to_account;
From: Dmitry A. Kazakov on
On Mon, 07 Jun 2010 16:09:37 +0200, Georg Bauhaus wrote:

> On 07.06.10 15:27, Dmitry A. Kazakov wrote:

>> They will rather distract from design in favor
>> debugging.
>
> We'll see. I still wonder why one would not want to
> specify more than the subtype constraints can achieve
> (without contorted(?) emulation of another type system).

To specify? You have used an improper word. The correct on is *to program*.
I have nothing against programming. Just don't sell me this as
specifications. They are not. And I certainly don't want *parts* of the
program being turned off by compiler switches.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Dmitry A. Kazakov on
On Mon, 07 Jun 2010 17:00:07 +0200, Georg Bauhaus wrote:

> On 07.06.10 16:51, Dmitry A. Kazakov wrote:
>> On Mon, 07 Jun 2010 16:12:38 +0200, Georg Bauhaus wrote:
>>
>>> On 07.06.10 14:22, Dmitry A. Kazakov wrote:
>>
>>>> This includes the exceptional ones. When bug
>>>> happens, the program is in no state.
>>>
>>> Erh, are you sure?
>>
>> Yes I am. Any program state is defined, it has some sematic interpretation
>> in the domain. Bug is when you have lost this synchronization. Meaningless
>> state is no state.
>
> Then what constitutes a bug?
>
> procedure add_to_account(Number: in out Account_ID; sum: Money) is
> client_account: Account := Find_Account(Number);
> begin
> -- FIXME: not ready, using dummy account
> client_account := Make_new_Account;
> end add_to_account;

Where is a problem?

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Martin Krischik on
Am 07.06.2010, 17:09 Uhr, schrieb Dmitry A. Kazakov
<mailbox(a)dmitry-kazakov.de>:

> On Mon, 07 Jun 2010 17:00:07 +0200, Georg Bauhaus wrote:
>
>> On 07.06.10 16:51, Dmitry A. Kazakov wrote:
>>> On Mon, 07 Jun 2010 16:12:38 +0200, Georg Bauhaus wrote:
>>>
>>>> On 07.06.10 14:22, Dmitry A. Kazakov wrote:
>>>
>>>>> This includes the exceptional ones. When bug
>>>>> happens, the program is in no state.
>>>>
>>>> Erh, are you sure?
>>>
>>> Yes I am. Any program state is defined, it has some sematic
>>> interpretation
>>> in the domain. Bug is when you have lost this synchronization.
>>> Meaningless
>>> state is no state.
>>
>> Then what constitutes a bug?
>>
>> procedure add_to_account(Number: in out Account_ID; sum: Money) is
>> client_account: Account := Find_Account(Number);
>> begin
>> -- FIXME: not ready, using dummy account
>> client_account := Make_new_Account;
>> end add_to_account;
>
> Where is a problem?

He should not have called Make_new_Account and the add promised by the
name of the function never happens.

Martin
--
Martin Krischik
mailto://krischik(a)users.sourceforge.net
https://sourceforge.net/users/krischik
From: Martin Krischik on
Am 07.06.2010, 17:05 Uhr, schrieb Dmitry A. Kazakov
<mailbox(a)dmitry-kazakov.de>:

> And I certainly don't want *parts* of the
> program being turned off by compiler switches.

In Java it is even worse: Parts of your program are switched on by runtime
switches. See the -enableassertions.

Martin

--
Martin Krischik
mailto://krischik(a)users.sourceforge.net
https://sourceforge.net/users/krischik