From: Robert Klemme Date: 2006-07-09T06:55:08+09:00 Subject: Re: storing and using references to variables Russell Fulton wrote: > Robert Klemme wrote: >> 2006/7/8, Phillip Hutchings : >>> If this isn't appropriate you'll have to use a container as you are at >>> the moment. >> I'd really like to know what problem Russel is trying to solve. I >> never felt the need for this in Ruby - maybe he's still thinking a tad >> too much the Perl way. Russel, any concrete problem you are trying to >> solve so we can come up with more concrete suggestions? >> > > the suggestions by other posters will work fine. Defining a container > class is the obvious way to do it -- I'm an experienced programmer but a > Ruby newbie -- I'm still getting my head around the subleties :) Still it might not be a good solution. There are already reference types (look for Delegator, SimpleDelegator and WeakReference). That's why I asked what concrete problem you are trying to solve. It seemed to me that you want to transfer a concept that works good in Perl to Ruby where it does not fit that well. So there might be a better solution. Kind regards robert