> One problem that I can see is that Optional Interface Check could
> impose a significant cost on those who aren't interested in
> type-checking. Primarily, integrating type-checking code with
> non-type-checking code could be a burden. I really don't want to be
> browsing through ruby code libraries thinking "is this a type-checked
> library?" Or worse, downloading some ruby code only to find that it
> didn't mention that type checking was a core approach of the library.
> For these reasons, I think the burden should be on the type-checking
> implementors to be able to disable the checking with no or few ill
> effects. Hmm, I guess this comment applies slightly more to
> interface/inheritance checking systems instead of "method signature"
> based systems.

As I see it now - for me it is certainly not a settled issue either -
maybe an interface could just give you a convenient way to do respond_to?
checks. And any object could be allowed to "duck type" the interface. But
declaring that a class does implement the interface can serve as
documentation, just like formalizing the respond_to? checks using those
interfaces can. I still like the idea of self-documenting code because
it's harder to get inconsistent. But for that, it would only work really
well if it was a language feature rather as an extension.  Especially
since the only way to disable it such that it becomes overheadless
currently is when it is built in, though a feature like :wrap or :pre
could change that.

Maybe what I'm trying to say is that if duck typing is The Ruby Way, then
it can't hurt to have some support for that in Ruby. I guess I'm someone
who's pretty sensitive to the I-have-done-this-before feeling, and when
documenting code or writing unit tests I easily feel like I'm doing
something over and over again when it comes to duck typing - among other
things, but it's about duck typing now. This feeling is what makes me long
for another language each time I learn a new one. But anyhow, like I said,
if duck typing is The Ruby Way, I feel that including support for that on
more levels than we have now does not limit anything but can save (at
least me) some time because some things happen automatically.

Maybe that's just me...

Peter