contravariant argument types: wanna?
Justin Johansson
procode at adam-dott-com.au
Tue Sep 22 18:22:55 PDT 2009
Andrei Alexandrescu Wrote:
> Today D does not support contravariant arguments, but Walter told me
> once he'd be quite willing to implement them. It is definitely the right
> thing to do, but Walter would want to see a compelling example before
> getting to work.
>
> Is there interest in contravariant argument types? If so, do you know of
> a killer example?
FWIW, some background reading material which might be useful to others.
http://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)
http://www.icsi.berkeley.edu/~sather/Documentation/EclecticTutorial/node5.html
A lot to digest in the following paper but looks like multiple dispatch might be the killer example ???
http://cs-people.bu.edu/jhallett/papers/oops07.pdf
-- Justin Johansson
More information about the Digitalmars-d
mailing list