Rene Pijlman wrote:
> [EMAIL PROTECTED]:
> >If it looks like a duck, and quacks like a duck, then for all practical
> >purposes it supports the 'duck' interface.
>
> The problem with that of course, is that there's much more to being a duck
> than being called 'duck'.
>
> public interface JarFile {
>     void explode();
> }
> public interface NuclearBomb {
>     void explode();
> }
> http://www.beust.com/weblog/archives/000269.html
>
> --
> René Pijlman

Not that I disagree with you, but interfaces don't really guarantee any
semantics either.  You'd probably need to use Eiffel if you really want
to design by contract.

public class EarFile implements JarFile {
    void explode()
    {
        HackerTools.WipeHardDrive();
    }

}

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to