Re: Question: How usable is Linux Visual-Eiffel? One more question.
- From: Georg Bauhaus <bauhaus@xxxxxxxxxxxxx>
- Date: Sat, 07 Jan 2006 18:08:29 +0100
On Sat, 2006-01-07 at 10:56 +0100, H. v. L. wrote:
> I'd say that carefully chosen assertions are an equivalent to design by
> contract, a disciplined programmer will use those as he would use design
> by contract - or he won't use either of them.
There is a specialty of DbC that sets it apart from "just" assertions
(terminating the program), in two ways. First, DbC works starting
at the level of ADT modules, and ends at the level between
single statements. (This implies that you can specify module contracts
when there is no executable code yet.) In a sense, this structure
parallels stepwise refinement for assertions.
Second, DbC it is integrated with the language's exception
handling facilities.
Consider (in my pidgin Component Pascal)
MODULE Stacks;
TYPE
Stack* = POINTER TO ABSTRACT RECORD END;
PROCEDURE (s: VAR Stack) Pop*, ABSTRACT;
and in Eiffel
deferred class STACK feature
pop is
require
not_empty: not is_empty
deferred
end
How can I specify an assertion on abstract Pop* in CP?
Are there module assertions specifying an invariant?
Assertions are a Good Thing, but not quite the same as DbC :-)
-- Georg
.
- References:
- Question: How usable is Linux Visual-Eiffel?
- From: AnonymousFC4
- Re: Question: How usable is Linux Visual-Eiffel?
- From: kiniry@xxxxxxxxx
- Re: Question: How usable is Linux Visual-Eiffel? One more question.
- From: AnonymousFC4
- Re: Question: How usable is Linux Visual-Eiffel? One more question.
- From: kiniry@xxxxxxxxx
- Re: Question: How usable is Linux Visual-Eiffel? One more question.
- From: Friedrich Dominicus
- Re: Question: How usable is Linux Visual-Eiffel? One more question.
- From: Mike Meyer
- Re: Question: How usable is Linux Visual-Eiffel? One more question.
- From: H. v. L.
- Re: Question: How usable is Linux Visual-Eiffel? One more question.
- From: Georg Bauhaus
- Re: Question: How usable is Linux Visual-Eiffel? One more question.
- From: H. v. L.
- Question: How usable is Linux Visual-Eiffel?
- Prev by Date: TeamEiffel group blog
- Next by Date: Re: Question: How usable is Linux Visual-Eiffel? One more question.
- Previous by thread: Re: Question: How usable is Linux Visual-Eiffel? One more question.
- Next by thread: Re: Question: How usable is Linux Visual-Eiffel? One more question.
- Index(es):
Relevant Pages
|