"MikkelFJ" <mikkelfj-anti-spam / bigfoot.com> writes:

> First the example (3 + 4) can always be optimized because the values are
> constants.

Not really....

  class Fixnum
    def +(other)
     "boo!"
    end
  end

  puts 3 + 4

Now admittedly, the runtime could do some work to handle this, but it
could be hard, particularly in the face of 'eval' and friends. You
might have to keep the old bytecodes lying around, and reactivate them
if you ever determine any operators such as '+' had been changed.


Cheers


Dave