python interfaces

r.grimm at science-computing.de r.grimm at science-computing.de
Mon Jan 7 08:33:15 CET 2008


On Jan 6, 11:01 am, Fredrik Lundh <fred... at pythonware.com> wrote:
> r.gr... at science-computing.de wrote:
> > Interfaces are a extremly smart Design Principle in static typed
> > languages like Java and C++.
>
> that's somewhat questionable in itself, and even more questionable as an
> argument for interfaces in Python.
>
> I'd recommend anyone who thinks that they cannot program without formal
> interfaces to try using Python as Python for a while, before they try
> using it as something else.  you might be surprised over how easy it is
> to build robust stuff without having to add lots of extra constraints to
> your code.
>
> </F>
Hallo,
I argued, that Interface and multiple  inheritance are  different
things and
especially, that Interfaces are very useful in staticially typed
languages.
In such languages like Java  and C++ you need a formalismen to guide
the user.
You may call it extension point, pure  virtual function or abstract
methode.

Sorry for the  misunderstanding, I argued for Interface in heavyweight
static
typed languages and nor for lightweight dynamic typed  languages like
python.
They aren't pointless and a hack.

Greetings Rainer




More information about the Python-list mailing list