----- Original Message ----- 
From: "Dave Thomas" <Dave / PragmaticProgrammer.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Tuesday, July 16, 2002 1:01 PM
Subject: Re: TkText no -textvariable workaround?


> Dossy <dossy / panoptic.com> writes:
> 
> > I did say "academically" -- in a pure OO language where everything
> > is an object, the receiver would be the object a, and the method -- or,
> > the message being sent, would have been "=(x)" ...
> 

[much snippage]

Very interesting and enlightening. This is probably
the real reason, I guess, that Ruby works this way.

> Now we have something interesting. The Fixnum '1' that is currently
> 'a' now becomes the Fixnum '2'. But Fixnums are immediate values, so
> how are we to implement this? Do all '1's become '2'?

<anecdotage>
OT: This stirs a dim memory in my mind. Sorry I keep
reminiscing and regressing to the past -- it's a
quirk of advanced age (I recently turned 41).

In older versions of FORTRAN, there was a simple way of
doing just that -- I forget how it worked -- a COMMON
block or something? You could have a stored "constant" 1
and change it (say) to 2... upon which every 1 referenced
as a constant in the program would be changed to a 2 
internally (since the compiler pooled its constants). So
a statement MYVAR = 1 would then assign the value 2 when
it was executed... amazing language, FORTRAN. Usually when
you're given enough rope to hang yourself, you gain 
flexibility and power as a benefit. Not in this case!
</anecdotage>

Hal Fulton