Re: TUPLE type conformance to non-conformant types

Cyril ADRIAN <[email protected]> Fri, 05 Aug 2005 01:22:35 +0200
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <[email protected]>
Alexander Rios wrote:

>The following TESTER class does NOT conform to ANY.
>I mean, it "inserts" class ANY.  It uses non-conforming inheritance.
>
>Yet, its 'say_hello' procedure can be assigned to a PROCEDURE[ANY,TUPLE].
>
>Since the class below does NOT conform to class ANY how can
>say_hello be assigned to a PROCEDURE[ANY, TUPLE]???
>
>The following code compiles and runs fine on the current beta.
>  
>
Yes, maybe it shouldn't.

Yet, as far as we understand the first argument of ROUTINE and heirs, it
is purely informative and totally useless in regard to the type system
(*). So I think that's why it is not tested for conformance.

I pushed the test a bit further: declaring f as a
PROCEDURE[STRING,TUPLE] also works perfectly...

I don't know what will ve decided in that respect (most members of the
team are in holidays).

Best regards,

Cyril

--------
(*) The information comes from the introspection mechanism proposed by
ISE. It indicates in which class the feature designed by the agent was
declared.

I think that the useful type information of an agent is the type of the
arguments and of the result. Not where it comes from (and I'd like to go
as far as to say that's opposite to the philosophy of agents).

Hence, usually people never use anything else than ANY as a first
argument. You can even put NONE, for what it's worth.

-- 
Cyril ADRIAN                                            Vt Sol inter planetas,
[email protected]                      Ita MVSICA inter Artes Liberales
http://www.cadrian.net/~cyril                                  in medio radiat
                                                      -- Heinrich Schütz, 1640