From: dblack@... Date: 2006-07-27T01:43:16+09:00 Subject: Re: I'll have the duck! Hi -- On Thu, 27 Jul 2006, ara.t.howard@noaa.gov wrote: > On Thu, 27 Jul 2006 dblack@wobblini.net wrote: > >> Hi -- >> >> On Thu, 27 Jul 2006, ara.t.howard@noaa.gov wrote: >> >>> On Wed, 26 Jul 2006 dblack@wobblini.net wrote: >>> >>>> 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. >>> >>> indeed - still that 'type' bit is quite a cause for confusion. >> >> Don't take it too absolutely concretely on a word-by-word basis, >> though. The "typing" in "duck typing" is a bit like the "bookkeeping" >> in "creative bookkeeping" :-) > > __except__ for the fact that 'type' is easily one of the most > semantically and emotionally loaded words for computer scientists - > especially those coming from strongly typed languages - so its use I'd say "bookkeeping" is a pretty suggestive and loaded term for accountants and tax people :-) (But read below too.) > naturally (as a search on this list will demonstrate) leads over and > over to the people's thinking of 'duck typing' as defining > categories meeting 'is_a/can_be' type constraints and as being > something that can be written. When it comes to the association between anything with "type" in it and is_a?-style checking, there's a more fundamental (hypoduck?) issue: namely, the tenacity of the assumption that type and class are the same thing. I think that "duck typing" is an attempt to get people away from that assumption -- but the problem is that the duck typing concept, instead, gets reinterpreted to accomodate the assumption. So one hears references to an object's "duck type", when what's really being talked about is simply the object's type (i.e., the object's capabilities and behaviors at a given point in runtime). And as long as one speaks of a "duck type", one implies that plain old "type" refers to something else; and the usual candidate for that is the object's class. David > even though we all know the duck typing that can be named is not the real > duck > typing. > > sorry, couldn't resist ;-) > > -a > -- > suffering increases your inner strength. also, the wishing for suffering > makes the suffering disappear. > - h.h. the 14th dali lama > -- 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