From: matz@... (Yukihiro Matsumoto) Date: 2001-08-02T09:46:13+09:00 Subject: [ruby-talk:18999] Re: "Bang" versions of numerical methods on non-immediate values [was: Numbers classes.. Rational number? ] Hi, In message "[ruby-talk:18990] Re: "Bang" versions of numerical methods on non-immediate values [was: Numbers classes.. Rational number? ]" on 01/08/02, Kent Dahl writes: |So for this to work for all numeric objects, we'd need a bang version of |an operator short-cut such as *= and friends? That would look bad: | a *!= 2 I have to think twice before making something immutable. So I did. I conclude that it would cause confusing which is worse than performance gain accomplished by it. I believe a language like Ruby makes people think like wealthy people, so that worrying performance too much along with confision caused by aliases are not ideal. In that sense, I shouldn't have introduce any bang method! In the future version, some operations are done inplace using 1-bit reference counting when there's no alias to the object, which I hope gain performance. matz.