<div dir="ltr"><div>For tuple values with named fields, we need more thoughts about semantics.<br></div><div><br></div><div><div>alias MyPair = typeof({1, "hi"});</div><div>alias MyRecord = typeof({count:1, msg:"hi"});</div>
<div>static assert(is(MyPair == MyRecord));  // true or false?</div><div>static assert(is(MyPair  : MyRecord));  // true or false?</div><div>static assert(is(MyRecord  : MyPair));  // true or false?</div><div>alias MyStudent = typeof({num:1, name:"John"});</div>
<div>static assert(is(MyRecord == MyStudent));  // true or false?</div></div><div><br></div><div style>Kenji Hara</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/29 Adam D. Ruppe <span dir="ltr"><<a href="mailto:destructionator@gmail.com" target="_blank">destructionator@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">My first thought when I saw {} was json. This is getting a little further away from tuples, but would it be hard to add named fields to this too like json:<br>

<br>
auto a = {"foo":12, "bar":"twelve"};<br>
<br>
int a_foo = a.foo;<br>
string a_bar = a[1];<br>
<br>
<br>
The std.typecons Tuple!() can do this kind of thing too.<br>
</blockquote></div><br></div></div>