On Sat, Jun 27, 2009 at 8:41 PM, Joel VanderWerf<vjoel / path.berkeley.edu> wrote: > Gregory Brown wrote: >> >> On Sat, Jun 27, 2009 at 4:52 PM, Fabian >> Streitel<karottenreibe / googlemail.com> wrote: > > ... >>>> >>>> def name(*args) >>>> ¨ÂåôõòÀîáíéæ áòçó®åíðôù>>>> @name = args.first >>>> end >>> >>> Better, but IMHO that's WAY too much overhead for something as basic as>> setter. >>> After all, you have to construct an array everytime you access the >>> setter... >> >> Huh? ¨Âèééó ôè÷áÒõâù áòçõíåîô÷ïòë îï íáôôåò ÷èáô ¨Âóéîç ªáòç>> just gives you raw access to the arguments. > > No, *args does construct an array. Interesting. Does this really matter though? I know that GC is slow in Ruby but just how soon would this become a problem in practical applications. (I suppose it depends on the application) -greg