From: Tom Pollard Date: 2006-12-20T04:23:07+09:00 Subject: Re: Discovering the number of return arguments requested. On Dec 19, 2006, at 10:50 AM, Brad Phelan wrote: > I'm only curious about this due to performance issues > not interface issues. [...] > In the case of Markaby I suspect there would be some > performance increase ( small maybe ) by changing the > Markaby code to do something different if it knew > beforehand that the fragment object was never required > instead of generating one and giving it straight to > the garbage collector. If the fragment is simply a pointer into a larger structure, then there might not be any significant penalty at all in providing it. If it does need to be constructed, then perhaps it could be provided in a lazy manner? One of the things I really like about Ruby is that accessors look just like attribute lookup. This makes it possible to change your mind about whether an object attribute is just a value, or is calculated on demand, without changing your object's interface. TomP