469,336 Members | 5,643 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

lies about OOP

I know this might not be the correct group to post this, but I thought
I'd start here.

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. Code reuse now consists of cutting and pasting followed by
enough modification that I wonder if it was worth it to cut and paste
in the first place.

Thanks.

Jul 18 '05
75 2920
Peter Hansen said unto the world upon 2004-12-15 17:39:
Martijn Faassen wrote:
Jive wrote:
Isn't there a comp.lang.flame or something?

I've doublechecked, but I didn't see any significant flaming in this
article (and I'm generally not very tolerant of it). My PSU posting
was certainly not intended as a flame, in case that was misinterpreted.

What'd I miss?

Has the PSU checked on the whereabouts of the time machine lately?

Maybe Jive took it. I did hear it had gone missing.

I could easily see this thread descending into a flame war in,
oh, about another ten posts. That would be so freaky...

-Peter


Without a doubt that is the most ignorant and small-minded thought that
ever has been, and ever could be, committed to words!

(My research project to build a super-cooled ultra-efficient time
machine goes poorly. To save the funding, I'm driven to fudging the
data. ;-)

Best,

Brian vdB
Jul 18 '05 #51
"H. S. Lahman" <h.******@verizon.net> wrote:
Les Hatton "Does OO sync with the way we think?", IEEE Software, 15(3),
p.46-54
"This paper argues from real data that OO based systems written in C++
appear to increase the cost of fixing defects significantly when
compared with systems written in either C or Pascal. It goes on to
suggest that at least some aspects of OO, for example inheritance, do
not fit well with the way we make mistakes."


Try and find and experienced OO developer who would advocate that large,
complex generalizations are a good practice. You can write lousy
programs in any paradigm. The likelihood increases when you use the
most technically deficient of all the OOPLs. (If those developers had
used Smalltalk, I'll bet their defect rates would have been
substantially lower even if they weren't very good OO developers.)


Careful, the paper never claims that C++ produced more defects than C or
Pascal. It only claims that the defects found in the C++ program were
more costly to fix. That is a very big difference.

However, I agree completely with the rest of your comments.
Jul 18 '05 #52
Brian van den Broek wrote:
Peter Hansen said unto the world upon 2004-12-15 17:39:
I could easily see this thread descending into a flame war in,
oh, about another ten posts. That would be so freaky...
Without a doubt that is the most ignorant and small-minded thought that
ever has been, and ever could be, committed to words!


And you, sir, must be, like, one of those Nazi type people,
like that guy, uh, what was his name? er.. Godwood, Goodwin, something
like that, anyway. (Hey, Jive, you happy yet?)
(My research project to build a super-cooled ultra-efficient time
machine goes poorly. To save the funding, I'm driven to fudging the
data. ;-)


Mmmmmm.... fudge....

Brian, with the two paragraphs of yours that I've quoted above,
I'm happy to say that this is the first time I've ever been
completely justified in calling someone a "flaming lunatic".

;-)
Jul 18 '05 #53
Peter Hansen:
(Darn those Norwegians, influencing people's ideas of how a
name like Hansen ought to be spelled, grumble, grumble.


And then there's my sister, a Nelson, who drove with friends
of their's, the Olsons, to visit our aunt and uncle, the Larsons,
and my grandmother, born a Hanson. Scandinavian heritage?
Det vet jag inte. :)

Sadly, none of them know Python. And my g'grandfather was
German in case you were wondering.

Andrew Dalke
da***@dalkescientific.com

Jul 18 '05 #54
Martijn Faassen wrote:
It's slow and no scientific research exists in its favor! Also it
doesn't work. Why would I need polymorphism? Lisp had all of this 50
years ago anyway. But functional programming by the way SUX TOO! So does
procedural programming! And structured programming SUX, GOTO all the way!


Your insightful post here has led me to reflect that a Deterministic
Finite-state Automata, the core of our initial studies of computation,
while not Turing-Equivalent, is blazes fast and thoroughly understood.
Such machines (DFAs) are pure GOTO machines, and therefore incredibly
beautiful; a very sharp knife to cut through modern problems.

This, of course, means that DJIJSTRA (there, one of the J's is right)
SUX!!!!!!!
Jul 18 '05 #55
Responding to Daniel T....
Try and find and experienced OO developer who would advocate that large,
complex generalizations are a good practice. You can write lousy
programs in any paradigm. The likelihood increases when you use the
most technically deficient of all the OOPLs. (If those developers had
used Smalltalk, I'll bet their defect rates would have been
substantially lower even if they weren't very good OO developers.)

Careful, the paper never claims that C++ produced more defects than C or
Pascal. It only claims that the defects found in the C++ program were
more costly to fix. That is a very big difference.


You're right. That's what I get for responding from memory of my
original reading of the paper. The mind is the second thing to go.
*************
There is nothing wrong with me that could
not be cured by a capful of Drano.

H. S. Lahman
hs*@pathfindermda.com
Pathfinder Solutions -- Put MDA to Work
http://www.pathfindermda.com
blog (under constr): http://pathfinderpeople.blogs.com/hslahman
(888)-OOA-PATH

Jul 18 '05 #56

"H. S. Lahman" <h.******@verizon.net> wrote in message
news:Lwiwd.15730$sr2.7536@trndny02...
Responding to Daniel T....
Try and find and experienced OO developer who would advocate that large,
complex generalizations are a good practice. You can write lousy
programs in any paradigm. The likelihood increases when you use the
most technically deficient of all the OOPLs. (If those developers had
used Smalltalk, I'll bet their defect rates would have been
substantially lower even if they weren't very good OO developers.)

Careful, the paper never claims that C++ produced more defects than C or
Pascal. It only claims that the defects found in the C++ program were
more costly to fix. That is a very big difference.


You're right. That's what I get for responding from memory of my
original reading of the paper. The mind is the second thing to go.

If it claims there are more defects in C++ than in C, then I am more than
willing to believe it, I would struggle to get a 3 line c++ program to
compile let alone run.

The leap that equates C++ to OOP, and C to SP would seem to be tenuous
though.
Jul 18 '05 #57
Dave Benjamin wrote:
In article <ma**************************************@python.o rg>, Adam DePrince wrote:
On Tue, 2004-12-14 at 18:27, Roy Smith wrote:
Terry Reedy <tj*****@udel.edu> wrote:

I did not really 'get' OOP until after learning Python. The
relatively simple but powerful user class model made more sense to
me than C++. So introducing someone to Python, where OOP is a
choice, not a mandate, is how *I* would introduce a procedural
programmer to the subject. YMMV.

OOP is a choice in C++ too. You can write procedural C++ code; no
need to use classes at all if you don't want to. Something like Java
is a different story. Java *forces* you to use classes. Nothing
exists in Java that's not part of some class.
Static methods act like C functions. Sure, they are members of classes,
but in name only. Besides, just as you can use a procedural language in
an OO fashion with enough programmer discipline, you can write in a
procedural style with an OOP language with sufficient rebellion. Just
use one class, put everything in it and create one instance on startup.

Maybe I'm reading this wrong, but it seems like you're implying that
procedural code is inherently unmodular. Why would just one class/instance
suffice to represent a procedural program? I think of namespacing and code
organization as broad concepts that cut across all styles of programming.

Well I can't speak for Terry, but I've observed in the past that
object-oriented system complexity can grow beyond the programmer's
ability to manage it when objects sprout too many methods.

Effectively each instance's namespace becomes a set of global variables
that the methods use to intercommunicate. This style of OO programming
sometimes drives me nuts (IIRC it was the library modules based on
SocketServer that drove me to this conclusion).
Interestingly, Python's main unit of modularity is the "module", not the
"class". A direct translation of a typical Python module to Java would look
something like a Java class containing only static methods and inner classes.
Even this would be considered rebellious within the context of ordinary Java
programming.

Well Java got some things right, but one of the things it got wrongest
was the absence of functions and procedures and the consequent need to
provide class methods. Though for the life of me I don't *really* know
why I find it acceptable in Python to have to write module.func(args)
when I dislike having to write class.meth(args) in Java.

perhaps-i'm-just-old-and-crotchety-ly y'rs - steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
Jul 18 '05 #58
Martijn Faassen wrote:
Peter Hansen wrote:
Martijn Faassen wrote:
Peter Hansen wrote:

Well, in any case, thanks for setting the record straight, Martjin.
That of course also happens to me once every while. I can take care
of myself though -- Dijkstra however needs an advocate for the
correct spelling of his name in this earthly realm.


Then there's us Danes, with "sen" instead of "son" (as many people
think it ought to be). And I can't even claim the wrong form
sounds noticably different, making any defense seem petty.

Obviously -sen is the only real suffix, as it's -sen in Dutch as well,
as in Faas-sen. :)
(Darn those Norwegians, influencing people's ideas of how a
name like Hansen ought to be spelled, grumble, grumble.
If they'd just invent a cell phone that used Python, as the
Swedish have, they might deserve all that extra attention.)

;-)

That's not the Swedes, it's the Finnish that did that. They typically
don't like being mistaken for Swedes. :)

That's because their language is derived from Serbo-Croat. But both the
Finns and the Swedes will tell you it's the Norwegians who are
alcoholics. They're all dreadful liars, these Scandinavians ;-)

regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
Jul 18 '05 #59
Paul McGuire wrote:
"Jive" <so*****@microsoft.com> wrote in message
news:lr**********************@news.easynews.com...
Everyone keep moving. There is nothing to see here. Move along.

You wish! If only ending a thread were that easy - we wouldn't be hearing
about "Why is Python slower than Java?" anymore!

But I agree with Martijn (note spelling) - I didn't notice any flames in the
thread, it seemed civil enough to me.

-- Paul

I suspect Jive just got bored with the thread. Easy to do when you are
seeing the same arguments from the same people for the umpteenth time,
but when that happens I try to remember there are people joining the
group all the time, so even my rantings are new to someone.

All the same, I'd like to thank Jive for his indirect responsibility for
triggering Martijn (who, by the way, SUX) to produce his last outburst.
Very few postings do actually make me laugh out loud, but that did.

regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
Jul 18 '05 #60
Steve Holden wrote:
They're all dreadful liars, these Scandinavians ;-)


So, you're saying they are not very good at lying?

(And be careful what you say about Scandinavians. I may
have to bring my axe to the next PyCon... "You! Where
is your payment voucher! Thwack! Everybody line up
here and deposit your wallets, watches, and villages
in this basket and you will be allowed to live!")

-Peter

P.S.: I'm only half Danish, but the other half is from
a particularly bloodthirsty line of Canadians.
Jul 18 '05 #61
Steve Holden wrote:

... I try to remember there are people joining the
group all the time, so even my rantings are new to someone.
You wish, Steve. ;-)
All the same, I'd like to thank Jive for his indirect responsibility for
triggering Martijn (who, by the way, SUX) to produce his last outburst.
Very few postings do actually make me laugh out loud, but that did.


Agreed. A good belly laugh is a good thing, provided the milk
dripping out of your nose can avoid the keyboard.
Jul 18 '05 #62
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.


The problem with OOP is not overhead in the sense of slower programs.
It's overhead in terms of complexity. OOP frameworks also make doing
simple things require way too much effort and study.

Inheritance is a very inflexible way of organizing code - it makes it
impossible/extremely difficult/expensive to change the design of base
classes. Hence, the recent popularity of interfaces as an alternative.

The thing I love about Python is how it manages to hide its OOP-ness
most of the time compared to languages like Java and C++. Python
concepts like 'protocols' greatly lessen the need to deal with
awkward OOP ideas.
Jul 18 '05 #63
Scott David Daniels wrote:
This, of course, means that DJIJSTRA (there, one of the J's is right)
SUX!!!!!!!


And so do DONALD NUTH, BRIAN ERNIGHAN, ROB PIE, EN THOMPSON, JOHN
CARMAC, FRED BROOS, NIKAUS WIRTH, ONRAD ZUSE AND STEVE WOZNIA!!

;)

--
"Codito ergo sum"
Roel Schroeven
Jul 18 '05 #64

"Steve Holden" <st***@holdenweb.com> wrote in message
news:41**************@holdenweb.com...
provide class methods. Though for the life of me I don't *really* know
why I find it acceptable in Python to have to write module.func(args)
when I dislike having to write class.meth(args) in Java.


I have the same reaction and I strongly suspect it is because the concept
of OOP class (of instances) has more mental baggage than module as
convenient name-grouping.

Terry J. Reedy

Jul 18 '05 #65
Peter Hansen wrote:
P.S.: I'm only half Danish, but the other half is from
a particularly bloodthirsty line of Canadians.

I thought it was physically impossible for Canadians to be bloodthirsty
outside of hockey games... ;)

Jeff Shannon
Technician/Programmer
Credit International

Jul 18 '05 #66
On Thu, 2004-12-16 at 18:23, Jeff Shannon wrote:
Peter Hansen wrote:
P.S.: I'm only half Danish, but the other half is from
a particularly bloodthirsty line of Canadians.

I thought it was physically impossible for Canadians to be bloodthirsty
outside of hockey games... ;)


When I read that I parsed it as reading "I'm Danish; my spouse plays a
mean game of hockey."

Adam DePrince
Jul 18 '05 #67

"Gregor Horvath" <g.*******@mx.at> wrote in message
news:TC*******************@news.chello.at...
Daniel T. wrote:
be*******@aol.com wrote:

A paper finding that OOP can lead to more buggy software is at
http://www.leshatton.org/IEEE_Soft_98a.html

Sure, OOP *can* lead to more buggy software, that doesn't mean it always
does.


I think that costs(=time) to develop and maintain software depends not
on wheter it is based on OOP or not but on two factors:

* Number of NEW Code lines to solve the given problem
* Complexity of this new code

Complexity of the code in turn may depend on too many factors.
For me OOP is good because it gives me the means to manage the
complexities. Remember that OO is not only about objects and
things like encapsulation, important part of OO analysis and design
is making dependencies "right" which in turn reduces complexity.
The anwser to the question if OOP is better is: it depends

If the given problem is solved with less code and complexity in OOP then
it is the better approach if not the reverse is true.
For any given problem there could an infinite set of solutions
expressed in any methodology. If you take best non-OO and compare
it with he worst OO, the winner is pre-determined :) And then
chosing a winner is always subjective, we are all people :) When
programs will be written by robots they will chose objective
criteria which will tell if OO is better for particular task.
But then we won't need to disscuss itin c.l.py :)
Thats why I like python because it does not force to use OOP or
procedural programming.

But isnt the main argument to code in Python (or other high level
languages) easy of use and compact code?

Therefore should Python code be less buggy and cheaper to develop and
maintain. Are there any papers on that?

Compact is not a synonim for less complex. It just means that you
can express a solution in fewer lines of code. COmplexity of the code
will remain the same as in any other language. And there is no bug-free
code, there is well-tested code.

Andy.


Jul 18 '05 #68
To canadians there is no "outside" of hockey games.

Jeff Shannon wrote:
Peter Hansen wrote:
P.S.: I'm only half Danish, but the other half is from
a particularly bloodthirsty line of Canadians.


I thought it was physically impossible for Canadians to be bloodthirsty
outside of hockey games... ;)

Jeff Shannon
Technician/Programmer
Credit International


Jul 18 '05 #69
Alex Stapleton wrote:
To canadians there is no "outside" of hockey games.


Some Canadians aren't so fanatical about hockey, or any sport.

For example, I've still never figured out how "conversions" work...
or switch-hitters.
Jul 18 '05 #70
In article <cp**********@utornnr1pp.grouptelecom.net>,
Peter Hansen <pe***@engcorp.com> wrote:

P.S.: I'm only half Danish, but the other half is from a particularly
bloodthirsty line of Canadians.


Oh, you're part Quebecois?
--
Aahz (aa**@pythoncraft.com) <*> http://www.pythoncraft.com/

"19. A language that doesn't affect the way you think about programming,
is not worth knowing." --Alan Perlis
Jul 18 '05 #71
Martijn Faassen wrote:

Imagine, for instance, what if he wants to egosurf, google for his own
name and finds nothing because everybody was saying Djikstra all the
time? That'd be terrible!


Fortunately, not in our time stream :

Dijkstra - 892 000 hits
Djikstra - 5 500 hits

"Edsger Dijkstra" - 25 500
"E. Dijkstra" - 8 080
"E. Djikstra" - 248
"Edsger Djikstra" - 36
"Edgar Djikstra" - 10

Jul 18 '05 #72
On Thu, 16 Dec 2004 11:45:56 -0500, Steve Holden wrote:
That's not the Swedes, it's the Finnish that did that. They
typically don't like being mistaken for Swedes. :)

That's because their language is derived from Serbo-Croat.


No it isn't.

[It's distantly related to Hungarian, if that's what you were
thinking of. Hardly "derived from", though]

--
If that makes any sense to you, you have a big problem.
-- C. Durance, Computer Science 234
(setq reply-to
(concatenate 'string "Paul Foley " "<mycroft" '(#\@) "actrix.gen.nz>"))
Jul 18 '05 #73
Paul Foley wrote:
That's because their language is derived from Serbo-Croat.


No it isn't.


time to tune your "absurd humour" sensor somewhat slightly? I thought
the next sentence was a pretty obvious giveaway:

"But both the Finns and the Swedes will tell you it's the
Norwegians who are alcoholics."

</F>

Jul 18 '05 #74
Fredrik Lundh wrote:
Paul Foley wrote:
That's because their language is derived from Serbo-Croat.


No it isn't.

time to tune your "absurd humour" sensor somewhat slightly? I thought
the next sentence was a pretty obvious giveaway:

"But both the Finns and the Swedes will tell you it's the
Norwegians who are alcoholics."

;-)
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
Jul 18 '05 #75
On Wed, 15 Dec 2004 17:37:08 -0500, rumours say that Peter Hansen
<pe***@engcorp.com> might have written:
Martijn Faassen wrote:
Peter Hansen wrote:
Well, in any case, thanks for setting the record straight, Martjin.


That of course also happens to me once every while. I can take care of
myself though -- Dijkstra however needs an advocate for the correct
spelling of his name in this earthly realm.


Then there's us Danes, with "sen" instead of "son" (as many people
think it ought to be). And I can't even claim the wrong form
sounds noticably different, making any defense seem petty.


So this means that if Guido was Dane too we would program in Pythen.

The Zon of Pythen. The Sen Of Dr Strangelove. Nice.

Happy new year in advance every one, don't start drinking before you
drive home :)
--
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...
Jul 18 '05 #76

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

62 posts views Thread by Ecohouse | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.