Can a low-level programmer learn OOP?

Rustom Mody rustompmody at gmail.com
Sat Jul 14 15:48:05 CEST 2007


On 7/14/07, Alex Martelli <aleax at mac.com> wrote:
>
> OOP can be abused (particularly with deep or intricate inheritance
> structures).  But the base concept is simple and clear: you can bundle
> state and behavior into a stateful "black box" (of which you may make as
> many instances, with independent state but equal behavior, as you need).
>

Many years ago (86??) Wegner wrote a paper in OOPSLA called Dimensions
of Object Orientation in which he called the 'base concept' of 'bundle
of state and behavior' as 'object based' programming and
'object-oriented' as object-based + inheritance.

What Alex is saying is (in effect) that object-based is simple and
clear (and useful) whereas the object-orientation is subject to abuse.

This anyway is my experience: C++ programmers are distinctly poorer
programmers than C programmers -- for some strange reason closeness to
the machine has a salutary effect whereas the encouragment of
uselessly over-engineered programs makes worse programmers.

GUI is one of those cases wherein inheritance actually helps people
produce better code but this is something of an exception.

And even here one of the most widely used popularisers of GUIs has
been VB which was (at least initially) not object-oriented.  VB shows
that language orientation -- tailoring 'the language' of drag-n-drop
to GUI-building and not just GUI-use -- wins over OOP.
Ruby/Rails is another example of language-oriented programming though
I feel it goes too far in (de)capitalizing, pluralizing,
(de)hyphenizing etc towards 'readability'.
[Sorry if this offends some people -- just my view!]

And this makes me wonder:  It seems that Tkinter, wxpython, pygtk etc
are so much more popular among pythonistas than glade, dabo etc.

Why is this?



More information about the Python-list mailing list