duck!

Jimmy Cao jcao219 at gmail.com
Sat Oct 16 12:34:23 PDT 2010


Haha!
But many people consider the interface system in Go as duck-typing,
so imo duck! is a very suitable name.

On Sat, Oct 16, 2010 at 2:25 PM, Adam D. Ruppe <destructionator at gmail.com>wrote:

> > 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101016/b790e475/attachment.html>


More information about the Digitalmars-d mailing list