Roy Smith <[EMAIL PROTECTED]> wrote:
> Peter Maas <[EMAIL PROTECTED]> wrote:
> > He probably means that with interfaces one could test compliance
> > with the interface as a whole instead of testing each member and
> > each signature as a single piece.
>
> All interfaces (as implemented by Java) prove is that your class has a
> bunch of methods with the right names and signatures. It doesn't
> prove that those methods do the right things. It's like having a
There's a _tiny_ bit more -- accidental clashes of methodnames are more
likely to be avoided. I.e.,
interface ILottery {
void draw();
};
interface IGunslinger {
void draw();
};
interface IPainter {
void draw();
};
A class asserting, e.g., "implements IPainter", doesn't thereby risk
being accidentally misused where an IGunslinger is required (OTOH,
implementing >1 of these IS a bother, but that's sort of inevitable).
Alex
--
http://mail.python.org/mailman/listinfo/python-list