python without OO

Peter Maas peter at somewhere.com
Thu Jan 27 05:07:42 EST 2005


Davor schrieb:
> I browsed docs a bit today, and they also confirm what I have believed - 
> that OO is totally secondary in Python.

OO is not secondary in Python. It's secondary for you :) And Python
leaves the choice to you.

> In fact, 
> object/classes/metaclasses are nothing but *dictionaries with identity* 
> in python.

Eliminating "nothing but" makes this a true statement :)


> Love this approach. In fact, you can very easily implement 
> your own *OO model* completely separate of Python's OO model... Now I 
> actually strongly believe that Python's author has introduced the whole 
> OO model just to attract and make happy OO population... 

I believe that your belief is wrong :) Guido van Rossum has introduced
OO to Python because it's a useful concept.

> and you can definitely be more productive using Python's structured 
> programming than Java/C++ OO programming :-)... and Python is probably 
> the best example why we should have skipped OO all together..

Sigh. Proceed as you like but be aware that dogmatism - OO as well as
anti-OO is always a poor guide. OO wasn't invented as a marketing buzz
but to support programming styles that emerged in non-OO languages to
control the increasing complexity of programs.

> so you get a nice program with separate data structures and functions 
> that operate on these data structures, with modules as containers for 
> both (again ideally separated). Very simple to do and maintain no matter 
> what OO preachers tell you...

The bad thing about OO preachers is not OO but preaching. And you
are preaching, too ;)

-- 
-------------------------------------------------------------------
Peter Maas,  M+R Infosysteme,  D-52070 Aachen,  Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------



More information about the Python-list mailing list