duck!

Adam D. Ruppe destructionator at gmail.com
Sat Oct 16 12:25:42 PDT 2010


> The problem is that D doesn't have duck-typing.

But it does and it has for a long time:

void func(A)(A a) {
   a.quack();
}

This new thing looks to me to be more like Go typing (lol?), where objects fulfill
interfaces without explicit templates on the functions nor decorations on the
class. Here's a name!

go!IWhatever(myclass)

hahaha.


More information about the Digitalmars-d mailing list