Re: Eiffel syntax and the ';'
Curtis Clauson <[email protected]> Sun, 14 Aug 2005 19:28:27 -0700
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Organization | The Snake Pit - Development |
| Message-ID | <[email protected]> |
Curtis Clauson wrote:
> <blah, blah, blah...>
Oh, one other note:
The amount of confusion over these compiler errors is almost always the
result of the compiler messages. For your example, SmartEiffel Release
2.2 Beta Release #2 returns:
-----
****** Error: Feature found is a procedure.
Line 21 column 18 in ROOT_CLASS (...\root_class.e):
x.f
^
Line 34 column 6 in ROOT_CLASS (...\root_class.e):
f is
^
-----
While EiffelStudio 5 (5.6.1113 Free Edition) returns:
-----
Error code: VUAR(1)
Error: wrong number of actual arguments in feature call.
What to do: make sure that number of actuals matches number of formals.
Class: ROOT_CLASS
Feature: make
Called feature: f from ROOT_CLASS
Number of actuals: 1 Number of formals: 0
Line: 21
-> x.f
(x + x).f
-----
As you can see, the EiffelStudio compiler error messages are quite
explicit about the cause of the error by mentioning the argument count
and displaying both involved source lines, while the SmartEiffel
messages do not address cause at all resulting in confusion. I'm not
advocating a commercial product, but Smart(Small)Eiffel could use some
more smarts. ;)
However, if SmartEiffel expands its error messages in a manner similar
to EiffelStudio, I would prefer to see a lot less wasted vertical space
and better word-use and grammar than in EiffelStudio. Like this (the
display font should be mono-spaced and the word-wrapping is an artifact
of the mail client and not intended):
-----
Error (###) in ROOT_CLASS.make: Wrong number of arguments found in a
feature call.
What to do: Make sure that the number of arguments in the feature call
match the number declared.
ROOT_CLASS.f arguments: Found 1, Declared 0
21 -> x.f
^
22 (x + x).f
ROOT_CLASS.f Declaration:
34 f is
-----
--
--------------------------------------------------------
The Snake Pit - Development www.TheSnakePitDev.com
Curtis Clauson [email protected]
Proprietor
"Any sufficiently over-complicated magic is indistinguishable from
technology." -- Llelan D.