Re: python interfaces



On Jan 4, 6:01 pm, Sion Arrowsmith <si...@xxxxxxxxxxxxxxxxxxxxxx>
wrote:
hyperboreean <hyperbore...@xxxxxxxxxxxxx> wrote:
Why doesn't python provide interfaces trough its standard library?

Because they're pointless. Java interfaces are a hack around the
complexities of multiple inheritence. Python does multiple
inheritence Just Fine (give or take the subtleties of super()) so
does not need them.

Hallo,
Interfaces are a extremly smart Design Principle in static typed
languages
like Java and C++.
C++ support Interfaces in a form of abstract base classes. They aren't
pointless.
They force the user of a framework to use it in a defined way. You
prescribe in
the base class the usage of a classsystem and allow only in derived
classes
to variate the behavior.
To appreciate Interfaces look at the Template Methode Pattern (http://
en.wikipedia.org/wiki/Template_method_pattern )
or especially at the Non Virtual Interface ( http://www.gotw.ca/publications/mill18.htm
) Idiom from Herb Sutter.

To be short C++ support Interfaces and multiple inheritace.

Greetings Rainer
.



Relevant Pages

  • Re: (rant) Ending 8 months of nuisance - ditching Vista at last
    ... release, sending us all back to square one, so persisting with it ... longer may be pointless anyway. ... Changing all the interfaces around with each release, ...
    (borland.public.delphi.non-technical)
  • Re: SMPE/HFS issue:
    ... CICS has Java interfaces. ... and DB2 Connect(DBRC, JDBC) and TPCIP. ...
    (bit.listserv.ibm-main)
  • Re: Java "interface" vs. OO interface
    ... >> Java interfaces do not provide a multiple inheritance feature at all. ... > optimization tool used to minimize code reuse. ...
    (comp.object)
  • Re: SMPE/HFS issue:
    ... CICS has Java interfaces. ... and DB2 Connect(DBRC, JDBC) and TPCIP. ...
    (bit.listserv.ibm-main)
  • Re: SMPE/HFS issue:
    ... CICS has Java interfaces. ... and DB2 Connect(DBRC, JDBC) and TPCIP. ...
    (bit.listserv.ibm-main)