Robert,<div><br></div><div>I tried using variant.d using your exact test program below and I got compiler errors:</div><div><br></div><div>$ dmd  variant.d dtest.d</div><div>variant.d(273): Error: no property 'length' for type 'Result'</div>
<div><div>variant.d(273): Error: no property 'length' for type 'Result'</div><div>variant.d(274): Error: no property 'length' for type 'Result'</div><div>variant.d(274): Error: no property 'length' for type 'Result'</div>
<div>variant.d(274): Error: no property 'length' for type 'Result'</div><div>variant.d(275): Error: no property 'length' for type 'Result'</div><div>variant.d(277): Error: no property 'length' for type 'Result'</div>
<div>variant.d(277): Error: no property 'length' for type 'Result'</div><div>variant.d(277): Error: no property 'length' for type 'Result'</div><div>variant.d(277): Error: no property 'length' for type 'Result'</div>
<div>variant.d(280): Error: no property 'length' for type 'Result'</div><div><div>$ dmd -v</div><div>DMD64 D Compiler v2.055</div></div><div><br></div>Am I missing a switch or something?</div><div><br></div>
<div>John<br><div class="gmail_quote"><br></div><div class="gmail_quote">On Tue, Oct 18, 2011 at 8:13 PM, Robert Jacques <span dir="ltr"><<a href="mailto:sandford@jhu.edu">sandford@jhu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">You could try out my improved variant implementation:</div>
<br>
<a href="https://jshare.johnshopkins.edu/rjacque2/public_html/variant.mht" target="_blank">https://jshare.johnshopkins.<u></u>edu/rjacque2/public_html/<u></u>variant.mht</a><br>
<br>
<a href="https://jshare.johnshopkins.edu/rjacque2/public_html/variant.d" target="_blank">https://jshare.johnshopkins.<u></u>edu/rjacque2/public_html/<u></u>variant.d</a><br>
<br>
Example:<br>
<br>
import variant;<br>
<br>
class Foo { int x; }<br>
void main(string[] args) {<br>
    Variant.__register!Foo;<br>
    Variant var = Object.factory( typeid(Foo).toString );<br>
    var.__reflect("x",Variant(10))<u></u>; // or explicitly<br>
    assert(var.__reflect("x") == 10);<br>
    return;<br>
}<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>John<br>blog: <a href="http://arrizza.blogspot.com/">http://arrizza.blogspot.com/</a><br>web: <a href="http://www.arrizza.com/">http://www.arrizza.com/</a><br>

</div>