It doesn't matter if it sounds unintuitive to you right now,<div>eventually if you keep using it, the word will stick.</div><div>duck! is a nice name, so I'm fine with the idea.<br><br><div class="gmail_quote">On Fri, Oct 15, 2010 at 4:46 PM, JimBob <span dir="ltr"><<a href="mailto:jim@bob.com">jim@bob.com</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"><br>
"Andrei Alexandrescu" <<a href="mailto:SeeWebsiteForEmail@erdani.org">SeeWebsiteForEmail@erdani.org</a>> wrote in message<br>
news:i9ae2n$k9g$1@digitalmars.com...<br>
</div><div><div></div><div class="h5">>I was talking to Walter about Kenji's adaptTo. We both think it's a very<br>
>powerful enabler, but adaptTo is a bland name. After discussing a few<br>
>marketing strategies, I proposed "duck". It's short, simple, and evokes<br>
>"duck typing".<br>
><br>
> class C<br>
> {<br>
> int draw(){ return 10; }<br>
> }<br>
> interface Drawable<br>
> {<br>
> long draw();<br>
> }<br>
> ...<br>
> auto c = new C;<br>
> auto d = duck!Drawable(c); // awes<br>
><br>
> Kenji, I'll be looking forward to your submission :o). Would be great to<br>
> allow structs to duck, too!<br>
<br>
</div></div>duck doesnt convey much meaning imo so.. why not "adapt!"<br>
<br>
Ties in with the Adaptor design pattern.. which i'm guessing is what it<br>
actualy does.<br>
<br>
<br>
</blockquote></div><br></div>