>>>>> "Dominique" == Dominique Colnet <
[hidden email]> writes:
Dominique> On Wed, 2009-02-25 at 18:51 +0000, Colin Paul Adams wrote:
>> It can't be done. Inline agents are a monstosity - they violate
>> every principal that Eiffel is built on.
Dominique> I do not have a real opinion, but I am afraid to share
Dominique> your point of view :-) --
Why? Do I have such a black name? :-)
Anyway, in short:
1) They work against code reusability. Cut-and-paste maintenance
becomes the order of the day - just what modern object-oriented
languages try to avoid.
2) They provide two ways of doing the same thing - feature call or
inline agent.
3) It is impossible to follow consistent style guidelines (such as the
ones in OOSC) and still end up with readable code.
The last point is why you cannot expect sensible indenting from
emacs. I do have an algorithm for pretty-printing an inline agent -
but it requires whole system analysis (i.e. find an unused name -
attach it to the ininline agent and extract the resulting code into a
new feature).
I have argued extensively in Eiffelroom and elsewhere, and people
consistently fail to come up with valid reasons for their
existence. I've also tried persuading the ECMA committee to drop it
from the standard, without success. That alone ought to be sufficient
to demonstrate to you that my point of view is right :-) (pity you
didn't manage to win the fight on ECMA about the rule for agent
conformance - ISE have now implemented runtime CATCALL detection in
EiffelStudio, and we get hectares of messages about alledged CATCALLs
when agents are involved :-( )
--
Colin Adams
Preston Lancashire