<div dir="ltr">On Tue, Jul 29, 2008 at 10:48 AM, Neil Vice <span dir="ltr"><<a href="mailto:sardonicpresence@gmail.com">sardonicpresence@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This would not break any code and helps to make the calling code less casty.<br>
</blockquote>
<br>
Or, you know, just make all instances of interfaces that don't extend IUnknown implicitly castable to object.<br>
</blockquote>
<br>
Can not structs implement interfaces? Should they be implicitly castable to Object?<br>
</blockquote></div><br>No, structs cannot implement interfaces, and it makes no sense to cast a struct to Object either implicitly or explicitly.<br><br>Structs in D are for representing value types and have no virtual methods or inheritance.<br>
<br>--bb<br><br></div>