From: Michael Sas Date: 2012-12-16T03:35:58+09:00 Subject: Re: by value - by reference, circular reference Allright, thanks robert. Its clear now how this attempt failed. There was a working solution, where all references where class variables of one big class. The constructors of all classes where unparameterized. If a resource was needed, it was accessed through the big class. I didn't like this solution, because the classes where tightly coupled to the big class. But it was a good thing, that exchanging one resource was trivial. Before that the circularly intertwined classes called each others initialize in their constructors, where self had an adress already. Worked. In my opinion it was the ultimate form of cuppling. Now i have rather long parameterlists. I don't like that either. Another solution would be to use setter methods. But that would mean writing a few lines of code per initialisation extra. The latter three solution also leave the question of globally exchanging a resource open. The circular reference must go. But this topic is interesting. What are the established ways to treat circular references, long parameter lists and globally used (and potentially variable) objects? -- Posted via http://www.ruby-forum.com/.