What is Expressiveness in a Computer Language

Joachim Durchholz jo at durchholz.org
Mon Jun 26 23:31:49 CEST 2006


Darren New schrieb:
> Marshall wrote:
>> Also: has subtyping polymorphism or not, has parametric polymorphism or
>> not.
> 
> And covariant or contravariant.

That's actually not a design choice - if you wish to have a sound type 
system, all input parameters *must* be contravariant, all output 
parameters *must* be covariant, and all in/out parameters must be 
novariant. (Eiffel got this one wrong in almost all cases.)

Regards,
Jo



More information about the Python-list mailing list