> For example, Eiffel covariance most likely only works in Eiffel, I doubt a
> C# class calling it is going to be terribly pleased(infact it may not be
> able to deal with the class at all, I dunno).
That's true - if you look at the IL, the object returned is an instance of
the anchor type. It's strictly an Eiffel language thing - not too suprising,
since so few languages support covariance for fields, parameters, and
results. That's why I wrote these lines in:
message news:OujQh8nbEHA.1644@tk2msftngp13.phx.gbl...
> > Covariance works in Eiffel under CLR 1.1 today, so it's not impossible to
> > implement, merely difficult -- although I'm fairly sure that this is
> > strictly an Eiffel language feature that the compiler manages for you,
> > just
> > like their support for generics and MI. The generated IL is some complex
> > kungfu.
Strictly an Eiffel language feature...

Signature
Mickey Williams
Author, "Visual C# .NET Core Ref", MS Press
www.neudesic.com
www.servergeek.com
Daniel O'Connell [C# MVP] - 21 Jul 2004 03:26 GMT
>> For example, Eiffel covariance most likely only works in Eiffel, I doubt
>> a
[quoted text clipped - 18 lines]
>
> Strictly an Eiffel language feature...
Ya, I missed the "strictly" in that. Sorry, ;). I am curious if methods with
covariant return types work in other languages or if they cause the
compilers to balk. To lazy to find and try eiffel though.
Hasani \(remove nospam from address\) - 21 Jul 2004 14:32 GMT
Well, created my post with c++.net and c# in mind.
What is the definition of a method/function signature, I thought it a
function's name, and the parameters/arguments. The return type can be
different
so
int Foo()
void Foo()
const char* Foo()
all have the same method/function signature.
> >> For example, Eiffel covariance most likely only works in Eiffel, I doubt
> >> a
[quoted text clipped - 22 lines]
> covariant return types work in other languages or if they cause the
> compilers to balk. To lazy to find and try eiffel though.
Mickey Williams [C# MVP] - 21 Jul 2004 18:59 GMT
"Hasani (remove nospam from address)" <hblackwell@n0sp4m.popstick.com> wrote
> Well, created my post with c++.net and c# in mind.
> What is the definition of a method/function signature, I thought it a
[quoted text clipped - 6 lines]
>
> all have the same method/function signature.
The signature does include the return type, but in C#, you can't overload
based only on the return type. You can change the return type in an overload
only if you also change the signature of the parameter list in some way.

Signature
Mickey Williams
Author, "Visual C# .NET Core Ref", MS Press
www.neudesic.com
www.servergeek.com