From: dblack@... Date: 2006-07-26T21:43:38+09:00 Subject: Re: I'll have the duck! Hi -- On Wed, 26 Jul 2006, ara.t.howard@noaa.gov wrote: > On Wed, 26 Jul 2006 dblack@wobblini.net wrote: > >> I've always felt that the Achilles' heel of the duck typing metaphor was >> the >> "then it *is a* duck" -- which implies that there's a Duck thing out there >> which something else can "be". > > i was thinking about this on my ride home and recalled a term used in damian > conway's object oriented perl book (a fastastic book on oo programming btw.) > and a term he used way back then : 'interface polymorphism.' the more i > thought about it the more i like the term better than 'duck typing' because > it's closer in spirit to the idea of something being an acceptable object > merely by implimenting (via method_missing or whatever) a certain set of > behvaiours. It sounds like a very useful term, but maybe not a synonym for duck typing...? I'm not sure, but it doesn't sound like one would say: Interface polymorphism is a way of thinking about programming in Ruby [if I'm paraphrasing Dave Thomas correctly]. One might say: Ruby offers interface polymorphism, which encourages duck typing [if I'm using i.p. correctly :-] My view is that we don't need to choose a winner-take-all term to refer collectively to *everything* connected with Ruby's type mechanism, including the way(s) programmers use that mechanism. We can have a slightly whimsical but expressive term like "duck typing" to refer to one aspect of it, and other terms to refer to other, related things. I'm fond of "duck typing", "quasi-prototyped objects", and various other terms -- all of which refer to something of interest. David -- http://www.rubypowerandlight.com => Ruby/Rails training & consultancy http://www.manning.com/black => RUBY FOR RAILS (reviewed on Slashdot, 7/12/2006!) http://dablog.rubypal.com => D[avid ]A[. ]B[lack's][ Web]log dblack@wobblini.net => me