On Jun 6, 2004, at 0:09, Sean O'Dell wrote:

>  Duck typing and
> checking respond_to? are completely inadequate, and it seems like 
> people
> argue those points because Ruby offers nothing else and so what are 
> you going
> to advocate?  It's those two or rolling your own interface 
> identification
> system, which I think is cheesy; that sort of functionality should 
> come from
> the framework.

I think to be fair you're asking too much of duck typing. It really is 
nothing to do with checking anything. It's about assuming, and allowing 
objects to behave polymorphically when they aren't actually related in 
the class hierarchy.

In your case, this doesn't help, so don't use it.

If the type system of Ruby doesn't help with your application, don't 
use it either. I don't: I code in the language appropriate for the work 
I'm doing. Over the last three days, I've written in C, Java, Ruby, 
TeX, and Emacs lisp.

Cheers

Dave