From: Robert Dober Date: 2008-05-30T00:08:32+09:00 Subject: Re: The duck's backside On Thu, May 29, 2008 at 1:35 PM, David A. Black wrote: > > s/Dave/David/ :-) s /^/So sorry, why does this always happen to me?/ > >> as >> if they were not in contradiction to what they are saying about duck >> typing afterwards. > > Sorry, I'm not sure which contradiction you're talking about. Can you > clarify? Contradiction is maybe a too strong a word, let me put it like this, IIUC, you and others made some interesting points about static modeling and ducktyping as one way of a more dynamic approach fitting Ruby's dynamic nature quite well. As many people on this list I completely adhere to this statement. I however have always thought that it was kind of exploring an interesting road without trying some new paths. E.g. using prototypes instead of inheritance and mixins or traits. Prototypes have been around for quite some while as a result of Ara's work, though I am afraid it is broken now. I have delivered a more primitive implementation (very slow 10*slower than mixins) of prototypes and a quite acceptably performing traits implementation (5*slower for 1.8, 2*slower for 1.9 although it could be faster than inheritance and mixins in a far future, but this is not really an issue here). Now I do not really want to promote my packages here, I will not even make the noise of putting uris here, those intersted can search for Labrador and ruby-traits on Rubyforge. What I want is to encourage people to go ahead, not accepting things as they are, forgetting of inheritance and mixins sometimes and try out some different approaches, not necessarily mine. And all that simply because I feel that establishing is_a? relationships does not really make much sense if we do not use them. The polymorphic approach is not at all limited to the static inheritance scheme, it is even much more ducktypier than that:). And that is why I believe that using class and inheritance and mixins is often convenient and very often not a problem at all, but it is maybe more a tool than a concept in Ruby. Pheww I hope I got some messages across if not sorry for the waste of bandwith. Cheers Robert > > > David > > -- > Rails training from David A. Black and Ruby Power and Light: > INTRO TO RAILS June 9-12 Berlin > ADVANCING WITH RAILS June 16-19 Berlin > INTRO TO RAILS June 23-26 London (Skills Matter) > See http://www.rubypal.com for details and updates! > > -- http://ruby-smalltalk.blogspot.com/ --- Whereof one cannot speak, thereof one must be silent. Ludwig Wittgenstein