Topic: Covariance - the Unnameable
Author: maxtal@physics.su.OZ.AU (John Max Skaller)
Date: Sun, 4 Dec 1994 00:46:46 GMT Raw View
In article <3blf6t$nnm@archive.ny.jpmorgan.com> tholaday@jpmorgan.com writes:
>One of the developers ran into difficulty getting the latest release of his
>compiler to accept a virtual function in a derived class which differed only
>in return type from the virtual function in the base class, for example:
>
> class Base { public: virtual Base & fn() ; } ;
> class Derived : public Base { public: Derived & fn() ; } ;
>
>Not surprisingly, there was nothing in the compiler manual's index under
>"Covariance," but I wouldn't have expected there to be even if the compiler
>supported it. The compiler-vendor's customer support people also expressed
>ignorance of the term.
Gak. The term "covariance" is the one used by the committee
to describe the extension to the ARM and any decent compiler
vendor would use exactly that term in describing the set
of extensions supported.
--
JOHN (MAX) SKALLER, INTERNET:maxtal@suphys.physics.su.oz.au
Maxtal Pty Ltd,
81A Glebe Point Rd, GLEBE Mem: SA IT/9/22,SC22/WG21
NSW 2037, AUSTRALIA Phone: 61-2-566-2189
Author: tholaday@jpmorgan.com (Thomas Holaday,COMM)
Date: 1 Dec 1994 21:29:01 GMT Raw View
One of the developers ran into difficulty getting the latest release of his
compiler to accept a virtual function in a derived class which differed only
in return type from the virtual function in the base class, for example:
class Base { public: virtual Base & fn() ; } ;
class Derived : public Base { public: Derived & fn() ; } ;
Not surprisingly, there was nothing in the compiler manual's index under
"Covariance," but I wouldn't have expected there to be even if the compiler
supported it. The compiler-vendor's customer support people also expressed
ignorance of the term.
I think "covariance" and "contravariance" are good, content-rich names that
happen to be little known, like "subtrahend" and "minuend." Does anyone
have any suggestions for how to talk about this property, in a sentence
such as "Does your compiler support covariance?" What is the language
in the DWP?