Paul Prescod wrote:

> Mark Nenadov wrote:
> 
>>...
>>
>>To the best of my knowledge Python was designed originally with OOP in mind (not
>>as an add on). Also, I wouldn't consider it a hybrid language.
>>
> 
> Python exposes the "self" argument as a parameter to the method. Many
> people take that as evidence that OO was bolted on. Really it was done
> this way merely to keep the amount of "syntax" in the language low.
> 
> Nevertheless, it is true that Ruby is more deeply and completely object
> oriented. I was playing today with adding methods to individual integers
> which was mentally gratifying if not especially useful.
> 
> It seemed to only work on "smaller" integers though...I don't know why
> that was. 
> 
'Small' integers are Fixnum of which the Ruby book says:

Fixnum objects have immediate value. This means that when they
are assigned or passed as parameters, the actual object is
passed, rather than a reference to that object. Assignment does
not alias Fixnum objects. There is effectively only one Fixnum
object instance for any given integer value, so, for example,
you cannot add a singleton method to a Fixnum.


Large integers on the other hand are Bignums, which are generated every time 

you use them. So, while 1 or 0x3FFF_FFFF always refer to the same object, 

0x4000_0000 does not. 

> Python is moving into a deeper OO direction but Ruby is already there.
> To me that wouldn't be enough to offset Ruby's immaturity issues but if
> I had different priorities I could see how it might.
> 
With Ruby, however, the whole stir-up that an advancement causes such as can 

be seen in the discussion of PEP238 on the Python news group can easily be 

avoided in Ruby thanks to its inherent deeper OO character and the absence

of a dichtomy between built-in types and classes, i.e. you can just 
redefine the /-operator rather than making an incompatible change in the 
language.


Bas