From: William Djaja Tjokroaminata Date: 2002-10-17T09:25:19+09:00 Subject: Re: Psyco Hi, As I am more into "performance" than "purity" (such as everything should be an object), in this case I think I favor the Java-like approach. Ruby is already "ahead" of Java in the sense that even a number like 5 is an object, so we can write code such as "5.times". I think it is good to be able to add methods; I myself added a factorial method to Integer. However, in my opinion, if we really want to be pragmatic, I think we should not allow anyone to modify the "+" method of a Fixnum, if it can result in increased performance. Can anyone give a practical example on why we ever want to modify the "+" method of a Fixnum? (Beside an excuse to the IRS, just like the previous Pentium calculation flaw? :) ) I think this is why C++ provides both virtual and non-virtual functions; Java approach is having "native" data type and "object". I am sorry that I have to refer to these 2 languages often; at least they have been commonly used for "programming in the large" projects. Regards, Bill ============================================================================= Hal E. Fulton wrote: >> 1) I don't think that modifying any class that you didn't write is EVER >> a good idea (it may be useful and it may even be the best solution >> available, but it's still not a good solution). > I don't agree, but I'm not passionate about it either way. > >> Fixnums looks like objects, they smell like objects, and most of the >> time they even act like objects, but they are really very very special >> objects. > Fixnums will become less special as time > goes by. Good or bad in your opinion? > Hal