[Tutor] tkinter events: <B1-Motion>

Alan Gauld alan.gauld at freenet.co.uk
Sat Sep 2 23:58:24 CEST 2006


> Well, I considered encapsulation as syntactical sugar.
> And even prolog knows polymorphism, but I wouldn't call it OOP.

Humor acknowledged, but...

Encapsulation can be syntactic sugar - and often is.
But the concept that it sugar coats is real enough.
You can write OOP by convention using languages
like C but its painful...

But for OOP you need BOTH concepts - encapsulation
and polymorphism. You can have either on its own and
not have OOP. You can even have both and not have
OOP, if they can't be combined.... But you can't have
OOP without both - or if you can I've never seen it!

> if Python is a multi-paradigm language why doesn't support polygamy? 
> :) )

:-)

>>The point being that Data hiding is an orthogonal issue
>>to OOP which relies on encapsulation and polymorphism.
>>- Encapsulation(*) is the ability to treat the data and methods
>>  as a single entity - an object.
>>- Polymorphism is the ability for different objects supporting
>>  the same protocol to react in different ways to the same
>>  message.
>>
>>Inheritance is an optional extra but is usually required to
>>implement polymorphism...

Alan G 



More information about the Tutor mailing list