python without OO

Jeremy Bowers jerf at jerf.org
Tue Jan 25 20:26:33 EST 2005


On Tue, 25 Jan 2005 15:01:23 -0800, Davor wrote:

> Thanks,
> 
> I do not hate OO - I just do not need it for the project size I'm
> dealing with - and the project will eventually become open-source and
> have additional developers - so I would prefer that we all stick to
> "simple procedural" stuff rather than having to deal with a developer
> that will be convincing me that his 50 layers inheritance hierarchy is
> good since it exists in some weird pattern that he saw somewhere on
> some Java design patterns discussion board :-)

The difference between Python OO and Java is that Python's *actually
solves problems* instead of creating them. 

Given your experience and goals, I'd recommend going ahead with your plan,
but the time will come when the Right Solution is creating a class, and I
strongly recommend that you not avoid it because of the bad taste Java has
legitimately left in your mouth. Odds are, that time will come sooner
rather than later, too.

I'd also recommend spending a bit more time with Python before trying to
lead a project in it. That's general advice not Python-specific, and I
understand that it is also sometimes impractical. However, you will pay
for it one way or another. If nothing else, people who have learned Python
and are capable of contributing valuable code are going to be very turned
off when they submit perfectly reasonable classes to solve problems and
get shot down for being OO.

(For context on my point of view, I offer up
http://www.jerf.org/writings/bowersLaw.html ; trying to create a
completely class-free large project in Python will be possible, but it is
probably inadvisable, as you are throwing away useful tools that you will
probably end up replicating anyhow. What Java teaches about OO is actively
harmful in learning Python and must be unlearned. Java is the new Basic.)



More information about the Python-list mailing list