On 8/8/06, Jeremy Henty <jeremy / chaos.org.uk> wrote:
> On 2006-08-08, Eric Hodel <drbrain / segment7.net> wrote:
>
> > Also, since a Fixnum is immediate, it doesn't "have" instance
> > variables because there's no Object to store them in.  Instead they
> > are stored somewhere else.  (Where isn't terribly important.)
>
> Thanks for pointing that out.  I had never thought to wonder where
> immediate objects put their instance variables.  Live and learn!

I hadn't either, and it once again impressed me with Ruby.

About 20 years ago there was a raging discussion between advocates of
REALLY dynamic OO languages like self, and more traditional dynamic OO
languages like Smalltalk.

Dave Ungar, who did most of if not all of the implementation of
Berkley's Smalltalk, and wrote his PhD dissertation on analysing it's
performance, and then went on to develop self, used to love to ask
people who had done Smalltalk implementations to dynamically add an
instance variable to Object, something which invariably crashed, or
inf-looped whatever Smalltalk VM it was tried on.

Ruby not only can do that, but it can add instance variables to instances.

Nice job, Matz!

-- 
Rick DeNatale