Guido rethinking removal of cmp from sort method
harrismh777
harrismh777 at charter.net
Sat Apr 2 01:17:56 EDT 2011
Chris Angelico wrote:
> Why this lengthy discussion on whether Python is object-oriented or
> not? What difference does it make?
Great question... glad you asked...!
> But bad things sometimes have to happen. And that's why things are
> versioned.
You didn't read the post... cmp removal is a bad thing, and it
does not need to, and should not have to happen.
Object oriented
> programming/design/analysis/architecture/whatever has no effect on
> that;
Wrong... one of the reasons for OOP in the first place ( OOA&D ) is
to ensure that BAD THINGS DO NOT HAPPEN. Code reuse and stability are
key... and OOA&D helps to make sure that works.
if you link against a library, or call on an object, you need to
> be able to depend on it. The interface of "sort([1,2,3,4])" is no
> different from "[1,2,3,4].sort()" just because one is objects and the
> other is functions.
You need to read Grady Booch... and study a little OOP design
either using SmallTalk, or C++, to get an appreciation maybe for what is
at stake here. Yes, Python OOP is optional for the client perspective.
But if chosen, OOP must WORK as expected by the OOP community if the
language is touted as being able to support OOP, which also implies
support for the spirit of OOA&D.
You may not have enough knowledge to understand what I'm talking
about. Forgive me.
kind regards,
m harris
More information about the Python-list
mailing list