From: Bulat Ziganshin Date: 2002-10-25T14:19:10+09:00 Subject: Re: Things That Newcomers to Ruby Should Know (10/16/02) Hello Mauricio, Wednesday, October 23, 2002, 7:04:16 PM, you wrote: >> MF> Would it be possible for Ruby to know whether an object is referenced by >> MF> several variables so += does '<<' or '... = ... + ...' when appropriate? operation 1 >> MF> Perhaps a bit in each String indicating whether it is shared or >> MF> not would make it... and GC issues could be ignored at first. operation 2 MF> Yeah, KISS applies always, but I may anyway try to implement this in the MF> future for the following reasons: MF> * the modification seems easy enough MF> * I will possibly learn more about Ruby's internals in the process MF> * if it's simple and makes Ruby faster, what can be wrong about it? i think, this will not make ruby faster. to begin, just add to interpreter counting of both operations. i think, number of operations 2 will be much higher. second, it will definitely make ruby FATter (one more bit per String variable) -- Best regards, Bulat mailto:bulatz@integ.ru