From: Bill Barnhill Date: 2006-03-15T00:14:32+09:00 Subject: Re: [RCR] abstract method in Ruby ------=_Part_4016_21132757.1142349256270 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Ok, I think I see what you mean. I didn't have the right understanding of duck-typing and your explanation of how it works make a lot of sense, thoug= h coming from Java the idea makes my stomach a bit queasy as I relied on Interfaces a lot. Thanks for help, --Bill On 3/14/06, Avdi Grimm wrote: > > On 3/14/06, Bill Barnhill wrote: > > If I have the constraint that objects within a certain group must be > able to > > respond to the methods that make up behavior X, then what would be the > best > > way to ensure that? > > The point of duck typing is that your code automatically ensures it, > without any extra work on your part, by raising exceptions when the > methods aren't implemented. The bonus you get for relying on your > code to do just-in-time type verification is that the "prototypes" > never get out of sync with the actual requirements of the code, > because the code IS the prototype. > > ~Avdi > > ------=_Part_4016_21132757.1142349256270--