duck!
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Oct 15 15:33:35 PDT 2010
On 10/15/10 16:16 CDT, Kagamin wrote:
> Andrei Alexandrescu Wrote:
>
>> I was talking to Walter about Kenji's adaptTo. We both think it's a very
>> powerful enabler, but adaptTo is a bland name. After discussing a few
>> marketing strategies, I proposed "duck". It's short, simple, and evokes
>> "duck typing".
>
> 1. adaptTo helped me to understand what it does, while duck!Drawable doesn't.
> 2. I don't think it's duck typing, I'm affraid "duck" name is misleading.
It's duck typing all right. Membership to the target interface is
assessed based on the existence of that interface's methods. If the
object "quacks" like the interface, it belongs to the interface.
Andrei
More information about the Digitalmars-d
mailing list