From: Dumaiu Date: 2006-07-25T21:35:10+09:00 Subject: Re: I'll have the duck! Daniel DeLorme wrote: > > So your objection is merely semantic? If DuckTyping isn't the "proper" > word to use, what would you suggest? That little module I knocked > together was just a way to mix-in methods into any object that responds > to the proper quacks--er, messages. DuckTyping seems like a good way to > describe that to me. > It's confusing. For my part, I wouldn't mind so much seeing a module called 'DuckTyping'--I would think, 'Okay, here's someone taking a shot at codifying a general concept'; but encountering the words 'duck' and 'quack' in actual method names makes me suspicious that someone is trying to be "cute." Or the issue can be linguistic. To take the example of your test module, on line 2 I see @@quacks = +whatever+ and my mind hits a rut. Is this a list of objects|methods|classes that are capable of quacking, or of the different vocal sounds that ducks make? Similarly, farther down you have a method called ducktype_method(methodname) But is 'ducktype_method' a noun or a verb? Perhaps you can apperceive the meaning of a method definition at first glance, but I (and probably some others) have to think about it, and the reuse of the same minimal vocabulary ducktype :quack do def quack_loudly quack.upcase end end is frustrating. It would be even more so if I were brand-new to Ruby. > > That sounds very silly, like saying that OOP or functional programming > can't be implemented in code. > For this comparison to be valid, you would have to turn duck typing into a programming paradigm: Duck-Oriented Programming. Is that really worth it?