PEP 245

Alex Shindich alex at server01.shindich.com
Mon Apr 2 01:14:40 EDT 2001


On Mon, 2 Apr 2001, Carlos Alberto Reis Ribeiro wrote:

> At 16:29 01/04/01 -0700, Alex Shindich wrote:
> >I do not want to restart the whole discussion on the difference between
> >base classes and interfaces, but I am of the opinion that they both
> >represent an is-a relationship.
> 
> Almost... base classes represent an "is-a" relationship. Interface 
> implementation represent an "work-as" relatioship (if there is anything 
> like this :-).
Whatever... I don't really see the difference. The client code doesn't
know and shouldn't know the difference between the two.
> That's right. I was just saying that I prefer it to stay this way.
Cool! We agree then.
> >This makes interfaces to be as good as doc strings...
> 
> In a sense, yes. In a dynamic typed language almost nothing is enforced; 
> there's the language syntax and nothing else. The documentation is the last 
> resort. Readability also helps a lot. If the interface support makes for 
> more readable code, then I'm all for it, if just for this reason.
I agree that readability is of a great importance. But I also think that
one of the reasons for Python's popularity is it's combination of
simplicity and power. The language is readable as is. Why make the syntax
more complex? Besides, developers with Java and/or COM experience will be
confused with the proposed implementation for the interfaces, as it
doesn't offer compile time checking.

I am just worried that the language will be polluted with a bunch of
foreign constructs from other languages. Not that those constructs are
bad, but they do not work as well in the dynamic systems such as Python.

-- 
Alex Shindich
mailto:alex at shindich.com
Visit http://www.shindich.com/





More information about the Python-list mailing list