From: Alex Martelli Date: 2003-09-15T00:43:56+09:00 Subject: Re: Duck Typing Luc Heinrich wrote: > Mark Wilson wrote: > >> I've seen some adoption of the term among python people recently. > > What ? They stole that too ?? :> I would claim independent invention, given that my post of Jul 2000 to c.l.py where I mused: """ In other words, don't check whether it IS-a duck: check whether it QUACKS-like-a duck, WALKS-like-a duck, etc, etc, depending on exactly what subset of duck-like behaviour you need to play your language-games with. If the argument fails this specific-ducklyhood-subset-test, then you can shrug, ask "why a duck?" (at least, you can if you're a Marx Brothers fan and have memorized "Cocoanuts"' script; Monty Python one-true-wayists will have to find their own simile here), and move on to the next set of tests (why-a-no- chicken immediately comes to mind, but then one would have to ask why it crosses the road, so I think we'd better snip it). """ was done before I had ever heard of Ruby, and explained as """ My instinctive approach (and it may be that I still haven't developed the "right" Python instincts, because I haven't been using it long!) """ while the first mention I can find in comp.lang.ruby is in a Jan 2001 post by Ben Tilly: """ Imagine a language where you are constantly telling the language everywhere that you have a duck because it is walking like a duck and talking like a duck. This is built into everything that you do. Then suddenly you find out that it isn't really a duck after all. """ Of course, it's quite possible that Google Groups' archive is incomplete for either or both languages. Alex