How to perform a reference assign?
<p>Try not to get too hung up on what I'm doing here, this is just an example:</p>

<pre><code>var @string = new RegexTerm("...");
var literal = new RegexTerm("...");
var key = @string | literal;
var dict = new Term();
var value = key | dict;
var kvp = key | value;
var item = key | kvp;
var set = item + !("," + item);
dict = "{" + set + "}";
</code></pre>

<p>I have a circular relationship. <code>value</code> needs <code>dict</code> to be defined, and <code>dict</code> needs <code>value</code> to be defined.</p>

<p>So what I've done is initialized <code>dict</code> to some placeholder Term so that I can use it in the following assignment, and then I give it it's real value later on.</p>

<p>The problem is that now <code>value</code> no longer refers to the same object as defined on the last line. I essentially want to re-assign <code>dict</code> without creating a new object.</p>

<p>Is there any way to do this without adding a setter? This would require me to create a public parameterless constructor on my <code>AndTerm</code> and then add a <code>Set</code> method, which just isn't as pretty, and allows you to construct invalid objects.</p>

<p>Or is there some magical way of reassigning <code>dict</code> to point to a new object and update all existing references? Apparently I'm not allowed to overload the <code>=</code> operator.</p>

<hr>

<p>Came up with one solution. I added an extra Term called a <code>ProxyTerm</code>:</p>

<pre><code>var dict = new ProxyTerm();
var value = key | dict;
...
dict.Term = "{" + set + "}";
</code></pre>

<p>This allows me to keep the base <code>Term</code> class as abstract, and then I don't need to expose any private variables or add any setters.</p>
