Yes, you are correct.  I am just playing with philosophy regarding the
Ruby object model.  At least the initial Tcl had all objects as string,
before it moved to the compound object model, where I think an
"object" (VALUE in Ruby) is a C 'union' of int, double, etc.  I don't
think Python (at least several years ago) had the concept of immediate
object and pointer object (but it has the concept of immutable object and
mutable object).

I think the closest thing to Ruby object model is Java object model, where
there are "native" data type and "object", for the reason that Java is
also interpreted.  Of course, we have to make variable declarations in
Java and Java was not written in C; so I don't know whether Ruby can also
have the magic of Java and not just have 'int' (and some others) as 
immediate object.  I think this is very philosophical; for C I am sure
Matz has thought thoroughly that the current object model is the best.  I
don't know if we use C++ whether we can have VALUE as "smart
pointer" instead and whether it will make the GC implementation somewhat
easier, like the example shown by Justin Johnson...

Regards,

Bill
===========================================================================
Christian Szegedy <szegedy / t-online.de> wrote:
> I think there is a minor inaccuracy in your considerations:

> In the current implementation of Ruby, there are 2**31 possible
> noninteger objects and 2**31 possible integers coded by one VALUE.
> If a single VALUE is used for storing floats, then you will
> have to reserve two bits instead of one for describing
> the type of the object : so you will have 30 bit integers and 30 bit 
> floats...

> Additionally, this would add an extra comparison to each object acces
> which would impair the overall performance a bit.

> Regards, Christian