[comp.lang.eiffel] Eiffel 2.2. wish list

kain@object.UUCP (Kai Ng) (07/17/89)

The assertion mechanism of Eiffel is very useful. Nevertheless, you are only
allowed to turn them all on or all off makes it less useful. To perfect it,
it would be more than nice to allow different levels of assertions be
turned on and off selectively. It believe everybody has to agree that there are
different stages of debugging and hence there are needs for categorizing
assertions accordingly.

I guess it can be accomplished pretty easily by generating conditional
compilation flags.

The following example should be able to illustrate the idea:


    aFeature (anArgument: ...): aClass IS
        -- Some comments.
        REQUIRE 0               -- the number 0 should be optional
            assertion0: anAssertion;
        REQUIRE 1
            assertion1: anotherAssertion;
        DO
            ...
        ENSURE 0
            assertion2: ...
        ENSURE 1
            assertion3: ...
        END; -- aFeature

To make it more readable or meaningful, the level number may be replaced with
some symbols should that the .eiffel file would read:

...
PRECONDITIONS (Y): production, beta, prototype
ALL_ASSERTIONS ...
...

'production', 'beta' and 'prototype' obviously represent the different
debugging requirements corresponding to different stages of development.

How about also putting it into our own wish list, Jim ?

-- 
Kai Ng                 P.O. Box 9707         UUCP: uunet!mitel!sce!cognos!kain
Cognos Incorporated    3755 Riverside Dr.
(613) 738-1440         Ottawa, Ontario,
 ext. 6114             CANADA  K1G 3Z4