Re: CATCALLs when running tests via geant

Eric Bezault <[email protected]> Mon, 03 Nov 2008 10:42:36 +0100
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <[email protected]>
Colin Paul Adams wrote:
>>>>>> "Eric" == Eric Bezault <[email protected]> writes:
> 
>     Eric> Colin Paul Adams wrote:
>     >> Some other the other reported problems appear to be due to the
>     >> poor conformance rule for agents.
> 
>     Eric> Yes, this has been designed that way to punish people who
>     Eric> want to overuse agents ;-)
> 
> So it's Franck's fault then, for persuading me to replace loops with
> iterators.
> 
>     >> so there is no error (`append_node' will receive an argument
>     >> that conforms to XM_XPATH_NODE). Therefore I need to supress
>     >> these messages. Is that possible?
> 
>     Eric> Yes, you can find the solution in Karine's slides from last
>     Eric> week.  Try to use:
> 
>     Eric>    agent append_node ({XM_XPATH_TREE_NODE} ?)
> 
> That won't work - some nodes will be XM_XPATH_TINY_NODEs instead.

Ah, I see. I think that I already raised this issue at ECMA
last year. Not being a big fan of "use agent everywhere"
I didn't push any further. In my opinion there are many
issues with agents that make me prefer use "regular" feature
calls (and hence loops). There is this typing issue. Then
there are the inline agents that are too verbose and go against
reuse. But without inline agents, agents are not expressive
enough to my taste. And the use of agents does not go very
well with DbC. Furthermore ISE's storable does not handle
them correctly. So, I'm fine using agents in very specific
situations. But not everywhere.

For your particular problem, perhaps you can add an extra
iterator routine in XM_XPATH_AXIS_ITERATOR, something like
`do_all_nodes' which takes a PROCEDURE [ANY, TUPLE [XM_XPATH_NODE]]
as argument.

-- 
Eric Bezault
mailto:[email protected]
http://www.gobosoft.com

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/