On 16/10/2010 21:30, Michel Fortin wrote:
On 2010-10-16 16:05:52 -0400, Andrei Alexandrescu
<[email protected]> said:
On 10/16/2010 02:54 PM, kenji hara wrote:
Adapter-Pattern! I'd have forgotten the name.
It is NOT equals to duck-typing.
It's a subset of duck typing. I don't think calling a function that
supports a limited form of duck typing "duck" is a lie.
Not a lie, just a word with a deceptive meaning that'll lead people to
believe something else than the truth. Some cynically call that
marketing speech.
I have to agree with Kenji and Michael here: this is not duck typing.
Duck typing is like example "6. Dynamic object type& dynamic signature"
in Kenji's last post.
The problem is not just strictly the name of the adapter function, but
that from this whole thread there was that the implication that you
Andrei, and Walter, were willing to market D as "having duck typing", or
"supporting duck typing", without any qualification on that support
("subset of", "limited form of", or even just "form of" like the Go
slides). So I agree with Michael, this would be inaccurate at best, and
deceitful at worst.
We could argue nomenclature, but there is a much more simple litmus
test: any non-D developer who used proper duck typing before, and then
heard "D has duck typing" from some official sources, and then tried D
out and found out how the actual feature worked, would almost certainly
feel deceived or disappointed.
--
Bruno Medeiros - Software Engineer