lies about OOP

Peter Hansen peter at engcorp.com
Mon Dec 13 23:04:11 EST 2004


projecktzero wrote:
> A co-worker considers himself "old school" in that he hasn't seen the
> light of OOP.(It might be because he's in love with Perl...but that's
> another story.) He thinks that OOP has more overhead and is slower than
> programs written the procedural way. I poked around google, but I don't
> know the magic words to put in to prove or disprove his assertion. Can
> anyone point me toward some resources?
> 
> We do web programming. I suspect that OO apps would behave as good as
> procedural apps, and you'd get the benefit of code reuse if you do it
> properly. 

The question in your first paragraph is largely answered (albeit
indirectly) by your second.  You are doing web programming.  It's
highly unlikely that you currently are near your limits in terms
of either "overhead" (I'll take that to mean memory usage) or
performance, and you are almost certainly limited by bandwidth.

In other words, you're I/O bound and not CPU or memory bound, so
any fuzzy concerns about the supposed sluggishness of OOP code
are seriously misplaced.

If I'm wrong, and your company has only just been surviving in
the market, solely by virtue of the incredibly quick and
lightweight code crafted by your wizardly but dated co-worker,
then I'll happily go to work disproving his ludicrous claim.

Until then, it's hardly worth the discussion... a clear case
of premature optimization, and in this case costing your
company huge benefits in lowered maintenance costs, higher
code quality, greater reuse, access to more up-to-date programmers
than your co-worker ;-) and so on.

-Peter



More information about the Python-list mailing list