duck!

Justin Johansson no at spam.com
Sat Oct 16 05:41:26 PDT 2010


On 16/10/2010 11:03 PM, Michel Fortin wrote:
> On 2010-10-16 03:30:27 -0400, "Christof Schardt" <csnews at schardt.info>
> said:
>
>>> auto d = duck!Drawable(c); // awes
>>
>> What about "as"
>>
>> auto d = as!Drawable(c);
>
> I like "as" much more than "duck". It's a good fit with "to".

It all comes down to some type of morphism, say, an isomorphism,
homomorphism, hetromorphism, polymorphism or other.

Maybe I am wrong but me thinks that "to" fits better with polymorphism
than isomorphism, whereas "as" fits better with "what quacks like"
and therefore asymptotically approaching isomorphism which I think
"duck typing" is all about.

To consider the argument further we could ask whether or not there is
is a bijective map f such that both f and its inverse f −1 are
homomorphisms, i.e., structure-preserving mappings. ..., and from
there further consider analogous mappings in the morphology domain
with respect to both isomorphisms and polymorphisms.

In short "as!" eats the lunch of "to!" in the "duck typing" metaphor.

Now we call upon the morphism experts to adjudicate.

Cheers
Justin



More information about the Digitalmars-d mailing list