From: Joel VanderWerf Date: 2006-09-21T03:39:12+09:00 Subject: Re: Ducktator - A Duck Type Validator Austin Ziegler wrote: > On 9/20/06, Ola Bini wrote: >> The problem with "just use it", is that you will have no control over >> error handling in this case. > > This is demonstrably untrue. Duck typing is not about validation. It's > about trusting your callers to do the right thing -- and then doing > the right thing when they don't. To extend Austin's point a little: In ruby, it really has to be this way. What if an object responds to a message by way of method_missing? There's no easy way to validate that. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407