<div dir="ltr">I was treating this as a Mixin.<div><br></div><div>So the property from Object is Mixed into Tree and User but it isn't a Subclass so any comparison between the two isn't possible.</div><div><br></div><div>But on reflection you bring up a very valid point.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">
<p><b><font color="#cc0000">___________________________________</font></b></p><p><b>James⎥Head Of CEO</b></p><p><b><font color="#cc0000"><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a>⎥<a href="http://supmenow.com" target="_blank">supmenow.com</a></font></b></p><p><b><font size="2">Sup</font></b></p><p><b><font size="2">Runway East
</font></b></p><p><b><font size="2">10 Finsbury Square</font></b></p><p><b><font size="2">London</font></b></p><p><b><font size="2">
EC2A 1AF </font></b></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Mar 24, 2016 at 5:34 PM, Tino Heth <span dir="ltr"><<a href="mailto:2th@gmx.de" target="_blank">2th@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><div><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>struct Object {</div><div>let identifier: String</div><div>}</div><div><br></div><div>struct User: Object {</div><div><br></div><div>}</div><div><br></div><div>struct Tree: Object {</div><div>}</div><div><br></div><div>The last two structs get the identifier property "mixed" in but are unique types :)</div></div></div></blockquote></div><br></span><div>Is unique meant so that User-Objects can't be used as "Object"-Object parameters?</div><div>I'm asking because this might be the biggest source of confusion with struct inheritance:</div><div>As the two "child-structs" don't add new data to their parent, they would (technically) be compatible — but this is fragile, so it might be preferable to "hide" polymorphism by default, and maybe add an annotation to explicitly allow that a sub-struct can be used as its parent type.</div><div>@compatible(Float) struct SpecialFloat: Float...</div><div><br></div></div></blockquote></div><br></div>