Hi, >From: matz / zetabits.com (Yukihiro Matsumoto) >Subject: [ruby-talk:15227] Re: Discussion on new Ruby features > The only elegant solution I can think of: > > * introduce reference counting. > > * + for String and Array (and others) concat to self, if reference > count is 1, which means there's no alias to the object. I have another idea; * + concat to self, if reference count is *0*, which means there's no *reference* to the object. Then, x = a + b + c will be equivalent to temp_obj = a + b # temp_obj is an imaginary variable, no reference to it. temp_obj << c # for String x = temp_obj Masa Tanaka