From: MonkeeSage Date: 2006-09-21T15:45:09+09:00 Subject: Re: Ducktator - A Duck Type Validator Hal Fulton wrote: > One thing I'm wondering is: Is there any evidence that this term > originated *other than* with Dave Thomas? > > Certainly it's known outside the Ruby community now, but didn't the > term originate *within* the community? > > Not that it matters really. AFAIK Dave himself doesn't claim to have > coined the term. And I take it for granted that the concept is older > than the term. >From everything I can gather Mr. Thomas at least popularized the term if not coined it. I just meant that I didn't know if he used the term differently from the way it has now become generalized and applied to other languages or theories of language design. I just found this, however, which is rather interesting [1]. > I'm not adamant about it. And I do perform this kind of checking > sometimes (gasp!). What!? You actually do that? Are you some kind of communist or something? Stop oppressing your objects and just leave them be free to be who they want to be!! Heh. ;P [1] http://wiki.rubygarden.org/Ruby/page/show/DuckTyping ======== Devin Mullins wrote: > MonkeeSage wrote: > > I trust everything that Wikipedia says. > (Well, I paraphrased that a bit...) LOL! Well I did quote WP alot, didn't I. It was just easier that trying to 'splain all that stuff myself (and I have a tendency to be ambiguous, if you haven't noticed already, heh). > (I was kidding, Jordan. Just messing wit j00. I lack knowledge of > category theory.) No worries, I caught that you were just kidding. We's c00, mang. ;) > * Scanning over chapter 23 of the PickAxe seems to confirm that that was > the intention -- pages 370-1 use the phrases "duck typing philosophy" > and "this style of laissez-faire programming," though, granted, the book > isn't consistent. Hey, the phrase is out there. It doesn't seem to have > a canonical definition. It's an ad hoc term. Treat it as such, I say. Interesting. So, judging by the link I posted above in reply to Hal, and this reference, it seems that sometimes Mr. Thomas uses the word in different ways (or as a qualifier that nuances it differently). Tim Bates touched on the topic in a mailing list post from 2004: "How to duck type? - the psychology of static typing in Ruby" [2] He considers the object signature validation approach (which he labels as (3)) to be compatible with duck typing, but not the "Zen" of it (which he labels as (4)), which is just to use the object. David Black also has some interesting comments in this RCR [3]. [2] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/100511 [3] http://www.rcrchive.net/rcr/show/318 I personally don't really care how one uses the term, but I just think that one valid use is the way myself and Ola were using it. Of course, I'm not biased toward the definition I use -- this is a purely objective observation! ;) Cheers to you and Hal, Jordan