Reading wikipedia, definition and the examples exactly match adaptTo. Before naming it, i think we should first be clear about if it is really duck-typing or not.

On Sat, 16 Oct 2010 21:44:51 +0300, Michel Fortin <michel.for...@michelf.com> wrote:

On 2010-10-16 14:32:10 -0400, Walter Bright <newshou...@digitalmars.com> said:

Nobody is going to start using D because it has a function *named* duck.
Maybe not, but it will raise awareness that "D has duck typing". Otherwise, I guarantee you that people will argue that "I need duck typing, and Z has it and D does not" if it is named adaptTo.

The problem is that D doesn't have duck-typing. The adapter pattern isn't duck-typing. Duck-typing is when you have an object and can call a 'quack' function on it and if there's no 'quack' function you get a runtime error.

It's like saying D is a dynamic language, people will know you're bullshitting them.



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Reply via email to