CONTRAVARIANCE FOR THE REST OF US

被引:0
|
作者
HARRIS, W [1 ]
机构
[1] HEWLETT PACKARD CO,SOFTWARE & SYST LAB,PALO ALTO,CA 94304
来源
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Contravariance is a phenomenon that occurs as an interaction between subtyping and higher-order functions. It affects all object-oriented programming languages including C++ and is usually circumvented by overloading. The author provides examples in C++ where overloading does not have the desired effect, and discusses what a better - more expressive and typesafe - language might look like.
引用
收藏
页码:10 / &
相关论文
共 50 条