[comp.lang.eiffel] Modification of previous enhancement ideas

shelley@atc.sps.mot.com (Norman K. Shelley) (02/15/90)

New Desired Feature(s) Beyond Eiffel 2.2B (24Jan90) (Modified 14Feb90)
Modifications to a previously posted message.

>3.) When any failure occurs the line number in the source should be printed
>out with the current failure message. 
>    One Supporting Example (many others are possible):
>If more than one inspect statement exists in a routine it becomes a guessing
>game as to which inspect statement really failed.
>
>4.) Assertion labels should be strings so that spaces, uppercase, and
lowercase
>could be supported. This would allow for more readable failure messages.

A modification of numbers three and four would be:
3.) When compiling a system in "make source code available" mode a
failure ought
to cause a viewer to appear with the appropriate source code in the viewer and
an arrow pointing to the line which failed.

4.) Assertion labels can be misleading and if an assertion is modified
the label
should be probably be modified also. The label is redundant in many cases and
the assertion is all one might need to see, so in addition to possible string
assertion labels a system like that suggested in feature  number three
(modified) would be VERY adequate on assertion failures

Norman Shelley
Motorola - ATC
2200 W. Broadway AZ09/M350
Mesa, AZ 85202
...!uunet!dover!atc!shelley
shelley@atc.sps.mot.com
(602) 962-2473

jacob@gore.com (Jacob Gore) (02/15/90)

/ comp.lang.eiffel / shelley@atc.sps.mot.com (Norman K. Shelley) / Feb 14 1990/
> 4.) Assertion labels can be misleading and if an assertion is modified
> the label should be probably be modified also. The label is redundant in
> many cases and the assertion is all one might need to see

Do people use labels for comments?  For example, consider the assertion

	x /= 0;

Now I want to document it, to explain why that assertion is made:

	x /= 0; -- since it could be a divisor

Oops!  That's safe enough as far as execution is concerned, but the
semantics of assertions say that a comment is an assertion by itself (an
informal assertion).  So the above should be read as two assertions,
rather than a single documented one.

But one can document an assertion with a tag:

	x_could_be_a_divisor_so_it_must_be_nonzero: x /= 0;

(yeah, I know, it is a silly identifier).

I have not done any real programming in Eiffel, so I'd like to know how
people who have feel about this.

Jacob
--
Jacob Gore		Jacob@Gore.Com			boulder!gore!jacob