On Tue, 26 Jun 2001, Eric Jacoboni wrote:
> A Manager "is a" Employee, reverse is not true (that's the classical
> assertion...) 
> In Ruby, it's legal to assign an Manager to an Employee with
> anEmployee = aManager
> anEmployee is now a Manager... I know Ruby doesn't care about type
> checking and i'm aware of the fact that both names are references,
> but, when it comes to classes, it hurts my inheritance conception. Is
> there a way to avoid this behaviour or is it a "feature" ?

It's a "non-feature". Names are not references, they are keys in a hash of
local variables that is called a Binding (or a hash of object variables
that is called an Object, ...). Those hash values are references. The
Binding not only does not allow you to specify explicit types for those,
but it also won't try to guess what type you try to enforce by looking at
the name. 

I don't know what you mean by "when it comes to classes".

matju