Ulrich W. <ulrich...@rz.uni-regensburg.de>:
First, congratulations for coming back to Eiffel.
There will be answers on specific points.
One of them: ``I thought "effecting" was "redefine" in the past’’. No change here. The terminology has been the same for as far as I can remember: you “effect” a deferred feature by making it “effective” (no longer deferred, i.e. provided with an implementation). If you want to change the implementation of a routine inherited as effective, you “redefine” it. “Redeclaration” covers both effecting and redefinition. Eiffel uses precise terminology. I realize it may look strange to people groomed in other languages, but I am not aware of any other terminology that is consistent and covers all the cases.
Another one, regarding the place of invariant and variant clauses for loops. (Congratulations for using them, by the way; not everyone does. Also by the way, with language changes and particularly compact forms of quantifiers, it becomes ever more realistic to write extensive, powerful loop invariants, such as those of our loop algorithms survey.) The original order seemed obvious but the reasoning behind moving clauses is that the invariant should be next to the exit condition, since their conjunction yields the loop’s effect. The variant, for its part, is there to allay concerns about termination so it is appropriate to have it come last.
Regarding backward compatibility: this is an issue to which the team devotes considerable time and discussion. In general the progression is, in successive releases: provide a new facility as an option that programmers have to turn on; turn it on by default, still accepting the old form; start flagging the old form through warnings. Possibly, as a last stage, reject the old form. That last stage may be viewed as a needless nuisance; indeed in many cases we do not bother and continue supporting old idioms. But there are exceptions: when the two variants conflict; and when we fear that supporting both forever would be too much of a nuisance for the compiler (its code should not turn into a living record of the language evolution).
Eiffel constructs have always come, as you point out, with justifications of why they are the way they are. In general these justifications remain. The language changes are typically of four kinds: elevation of the level of abstraction (agents); elevation of program reliability (void safety); introduction of more compact synonyms for special cases of constructs in common cases (short forms of quantifiers and loops); integrating technology advances (Unicode). In all those cases the old justifications remain. The fifth kind -- recognizing that something was designed wrongly, and fixing it -- does arise but is rare.
We strive to make the evolution path smooth, but it is true that this smoothness assumes that people adapt regularly. From one version to the next the transition is usually not too hard. But if you do a Rip van Winkle, going to sleep then coming back after 20 years or even just 5, you will probably need a few tweaks to make your code work again. I have done this a few times (not going to sleep, but resurrecting old code) found the process very reasonable.
We live in a fast-changing world and an even faster-changing industry. It would be surprising that the Eiffel language alone remained unchanged, a monument of perfection.
-- BM
--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/8d3030ce-5e57-4a95-99b1-b73b2921e7ea%40googlegroups.com.
Another one, regarding the place of invariant and variant clauses for loops. (Congratulations for using them, by the way; not everyone does. ...
--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/a2ffe886-5080-4501-a4e5-4b7d3f18d9f3%40googlegroups.com.
that is a very nicely stated pedagogic device. The 'intent' is
especially important. As an anti-pattern example, the EV2 classes
are full of comments that tell one nothing, and only restate what
one can see from the code... (I don't say this just to casually
criticise; it's worth iusing EV2 for a while to see what the
effect of this practice is, and it helps to understand why the
intent matters).
- thomas
I believe Larry is, if anything, under-selling the value of his process. The contracting hat, and a contracting eye are hugely valuable and, in the end, save overall development time while ensure higher quality software.
Identify (good naming; massaging the model, etc.)Intent (comment the code first, making clear its INTENT, and NOT paraphrasing its content)Instrument (contracts and then in-logic checks)Implement (the rest of the coding effort)
I have found this model effective, but especially so when dealing with remote teams and subcontractors. The latter should come as no surprise. Having your contracts in place enables you to farm out the implementation and have the necessary checks in place before (and after) implementation. This helps drive meaningful testing.
Eiffel makes all of this not only possible, but (with practice) almost second nature.
VWMA(1) is a safety warning for old projects. In the past, variable `a` after reattachmenta := <<"a", "b", "c">>could be attached to an object of type ARRAY [ANY], ARRAY [COMPARABLE], ARRAY [HASHABLE], etc. depending on the type of the variable itself. And it was the intended behavior. Nowadays, the type of the object does not depend on the type of the target of reattachment, it is the same all the time.So, if in the code you did rely on the old behavior, you can update it to becomea := {ARRAY [ANY]} <<"a", "b", "c">>and, I believe, the code can be updated automatically.If the code does not rely on the old behavior, and you are fine with getting ARRAY [STRING] instead of ARRAY [ANY], in the project setting dialog, turn off "Missing manifest array type" warning.Alexander Kogtenkov
Ulrich W. <ulric...@rz.uni-regensburg.de>:
Another amazing warning is this:Warning code: VWMA(1)
...
Explicit array type ARRAY [ANY] may need to be specified.
Computed type of array elements STRING_8 differs from the type ANY of target array elements.
Why wouldn't any array of STRINGS conform to an ARRAY[ANY]?
--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/6411a3b2-8027-4ba1-8aac-ddea86624d8e%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/c127a9cd-9597-4d32-81ca-c7d10feda6ba%40googlegroups.com.
It is very reasonable to expect the compiler to report what it was expecting, and to be more precise at the location. I remember the Rexx language, where the standard prescribed the exact errormessage for each type of syntax error. It is just a matter of writing the grammar accurately.I have often got stuck for a long time in puzzling out what the syntax error was supposed to be.
1 Syntax Error Syntax error at line 47. EL_DATA_SEGMENT (project) 47, 34
Syntax error at line 47 in class EL_DATA_SEGMENT
do
segment_as_row (a_data, a_row b)
------------------------------------------^
ensure
--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/593f019e-53fd-edea-4704-a254618a0ade%40gmail.com.
Revisiting the point about the order of clauses: I am no longer sure what the fuss was about since this is a case in which we *did* ensure backward compatibility. You can use the old order (variant clause immediately after the invariant) as well as the new one. If you used the old order you will get a syntax warning (only if you enable these warnings – we don’t want by default to overload users with warnings).
Did you actually try it?
It seems to me that in that case we did exactly the right thing – move forward with a more logical syntax, but maintain compatibility for existing code.
-- BM