From: Daniel Carrera Date: 2003-02-27T15:44:54+09:00 Subject: Re: Ruby Compile-time optimization On Thu, Feb 27, 2003 at 03:38:18PM +0900, Gabriel Emerson wrote: > Or don't raise an error... I don't think optimization should be > guaranteed. Kind of like 'register' in C... it's more a suggestion than > anything else. > > > 2) Give Ruby a '-O' option that does constant folding and raises an error > > if you either change the value of a constant or overload Fixnum#+. So you are suggesting that Ruby check to see if an operator is overloaded and do constant folding if it isn't? I think that's a good idea. There are several kinds of optimizations that can be done. Ruby could check if they are "safe" and optimize accordingly. -- Daniel Carrera Graduate Teaching Assistant. Math Dept. University of Maryland. (301) 405-5137