On Thu, Feb 27, 2003 at 09:59:38PM +0900, Michael Bruschkewitz wrote:
> In article <48509684717.20030227115407 / integ.ru>, bulatz / integ.ru 
> says...
> > ALL TYPES ARE HANDLED SAME WAY. 
> This is completely clear. Question (NOT TO BE DISCUSSED NOW) is, 
> which;), why;), couldn't it be done better;), ... ?
> 
> To make the problem clearer:
> def fu, h, key, &b, o 
> 	e = h[key]
> 	b.call(e,o) # should modify e
> end
> If e is of type Integer (for example), h[key] will not be modified),
> if e is of type Object, h[key] will be modified.

But Integer is also an Object (it's a subclass). There is no inconsistency.
Whatever function 'b' does, it is unable to change e. It can make method
calls to the object referenced by e, though, which may in turn change its
state if it contains instance variables.

Integers do not contain instance variables, and therefore there is no state
to change.

Regards,

Brian.