On 2010-10-16 13:19:36 -0400, Andrei Alexandrescu <[email protected]> said:

The problem with "adaptTo" is that, just like itoa or printf, it is too boring to have marketing value. I think the feature is going to be _big_. We can't leave a big feature to a name like "adaptTo". The New York Times won't have a headline like "adaptTo changes the name of the game".

It's risky in my opinion to bet that it's going to be a feature big enough that everyone will remember what it means. Also, "duck" is a misnomer. The commonly-accepted meaning of duck typing is basically dynamic dispatch based on function names, and when the function doesn't exist it's a runtime error. I bet you'll get a ton of negative feedback for misrepresentation or deformation of the concept. That said, it could bring attention, but perhaps not the kind of attention you'd like.

Programmers like automated things. That feature should be called "magic adapters" or "cheap adapters" (or some variation of that) because it's an adapter and it's magic/cheap, and people can search "adapter" and immediately get hundreds of results explaining the concept. And the function name could be "adaptTo", or "adapt" (or "magic" if you want it to look funny).

And I think I agree with your arguments about "as" having problems.


I'd go with the longer "ducktype". Length is not as important as evocative power and brand name!

auto d = ducktype!Drawable(obj);

At this point, why not call it ducktapeā„¢. Now that's a brand name.


--
Michel Fortin
[email protected]
http://michelf.com/

Reply via email to