lies about OOP

M

Martijn Faassen

Paul said:
Paul McGuire wrote:
[snip]
I would characterize the 80's as the transitional decade from structured
programming (which really started to hit its stride when Djikstra
published
"Use of GOTO Considered Harmful") to OOP, and that OOP wasn't really
"joyful" until the early-to-mid 90's.

IMMEDIATE NOTICE TO ALL PYTHON SECRET UNDERGROUND MEMBERS.

Classified. Any disclosure to non-PSU members prohibited. Offenders will
be apprehended and removed from the time stream, permanently.

<snip - it's "Dijkstra" not "Djikstra", you dolt! :)>

Yikes! (or better, "Jikes!" or even "Yijkes!"?) - my bad.
And he was on faculty at UT right here in Austin, too.

It's a very common mistake I've seen so often that for a while I
wondered whether his name really *was* Djikstra, but I knew he was Dutch
and that it couldn't be so. That the PSU picked you for its disclosure
is just a random coincidence, I'm sure.. :)

Regards,

Martijn
 
I

Ilja Preuß

Daniel said:
Mr. Hatton suffers from the same problem that many OO critics suffer.
He thinks that the language choice decides whether the program
written is an OO program. I've seen plenty of very non-OO systems
written in OO languages, I've seen expert OO systems written in
non-OO languages. OOP isn't a language choice, it is a style of
problem solving.

And he suffers from the common misunderstanding that OO is better because
"it matches the way we think about the world". It wouldn't suprise me if
design created with that reasoning in mind is more costly than a good non-OO
design.

If you use the features of an OOPL, most importantly polymorphism, to manage
the dependencies in your code, and you do have some experience doing so, I'm
quite certain that it reduces "corrective maintenance cost".

Take care, Ilja
 
P

Peter Hansen

Martijn said:
It's a very common mistake I've seen so often that for a while I
wondered whether his name really *was* Djikstra, but I knew he was Dutch
and that it couldn't be so. That the PSU picked you for its disclosure
is just a random coincidence, I'm sure.. :)

Well, in any case, thanks for setting the record straight, Martjin.
 
H

H. S. Lahman

Responding to Beliavsky...
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.)
His comments under "invited feedback" are amusing and confirm my
impression that OOP is partly (but perhaps not entirely) hype:

"I should not that this paper because it criticised OO had an unusually
turbulent review period. 2 reviewers said they would cut their throats
if it was published and 3 said the opposite. The paper was only
published if the OO community could publish a rebuttal. I found this
very amusing as my paper contains significant data. The rebuttal had
none. This sort of thing is normal in software engineering which mostly
operates in a measurement-free zone."

Part of that criticism was that his experiments were uncontrolled.
There was no attempt made to ensure that the programs under either
paradigm were of high quality for the paradigm. There were other
experimental issues, such as the scale of the programs, that make the
data anecdotal at best and a stacked deck at worst.
What papers have scientific evidence for OOP?

I don't know of any large, controlled studies but there must be some
buried in PhD theses somewhere. There is substantial anecdotal evidence
to the contrary, though. For example, where I worked before retiring we
ran a number of experiments to determine whether we should adopt OO
development. One experiment was for exactly the same MLOC application
(originally written in BLISS) that was rewritten in C and then in C++
using good OOA/D. The same developers, who were domain experts, were
used. Both C and C++ were new languages for most of them. [While they
were proficient at procedural development, OO was OJT. However,
extensive OOA/D training was provided.]

The initial development times were about the same, probably due to the
OO learning curve. The released defect rates for the OO version were
about 1/2 those of the C version. The big difference, though, was in
maintenance time, which was nearly an order of magnitude less for the OO
version. One of the first major rounds we estimated to take 6
engineering months using the established techniques we used for
procedural development (which were accurate to -5/+15%). Three people
turned the changes on the OO version in a week -- to the amazement of
everyone, including ourselves. Besides hard comparative data on time
spent, the permanent maintenance staff for the application dropped from
8 full-timers for the C version to one guy half-time for the OO version.

While this is anecdotal (among other things, it is dependent on the
OOA/D methodology employed), it was done with a whole lot more control
than Hatton's experiments. [We were a very process-oriented shop that
insisted on hard experimental data before instituting any process
change. We also collected data religiously. Not a lot of shops can
tell you immediately how much time the average developer spends in
meetings or the average time it takes to diagnose a memory over-write
problem. B-)]
Paul Graham's skeptical comments on OOP are at
http://www.paulgraham.com/noop.html .

If OOP is so beneficial for large projects, why are the Linux kernel,
the interpreters for Perl and Python, and most compilers I know written
in C rather than C++?

The main reason is performance. All those examples are very performance
sensitive. C will be ~twice as fast as C++ and C++'s design compromises
were made specifically to enhance its performance! In addition,
physical coupling is a much bigger problem in the OOPLs than in
procedural languages, so build time can become an issue for larger
applications.

[The OO translation-based approaches that do full code generation from
OOA models usually target straight C as the implementation language for
performance sensitive situations in R-T/E. (Also, translation code
generators can usually generate OOPL source code faster than it can be
compiled, but that is usually not true for C.)]


*************
There is nothing wrong with me that could
not be cured by a capful of Drano.

H. S. Lahman
(e-mail address removed)
Pathfinder Solutions -- Put MDA to Work
http://www.pathfindermda.com
blog (under constr): http://pathfinderpeople.blogs.com/hslahman
(888)-OOA-PATH
 
M

Martijn Faassen

Peter said:
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.

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! What, they don't have google in the eternal
realm? How can it be valhalla without google? Impossible.

Regards,

Martijn
 
M

Martijn Faassen

Jive said:
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?

Regards,

Martijn
 
P

Paul McGuire

Jive said:
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
 
P

Peter Hansen

Martijn said:
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.

(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.)

;-)

-Peter
 
P

Peter Hansen

Martijn said:
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
 
B

Brian van den Broek

Peter Hansen said unto the world upon 2004-12-15 17:39:
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
 
D

Daniel T.

H. S. Lahman said:
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.
 
P

Peter Hansen

Brian said:
Peter Hansen said unto the world upon 2004-12-15 17:39:

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".

;-)
 
A

Andrew Dalke

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
(e-mail address removed)
 
A

Adam DePrince

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.

Now that I think about it, Java is an exception to this. There are per
class code and variable limits in the JVM, limiting the size of your
procedural program masquerading as a class. Perhaps that is a good
thing.

Adam DePrince
 
D

Dave Benjamin

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.

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.
 
F

Fredrik Lundh

Isn't there a comp.lang.flame or something?

comp.lang.object ?

(there don't seem to be a comp.lang.procedural ...)

</F>
 
M

Martijn Faassen

Peter said:
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. :)

Regards,

Martijn
 
M

Martijn Faassen

Peter said:
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?)

Object oriented programming SUX! And Python too!

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!

Oh, and Vi SUX, Emacs all the way. Emacs Lisp SUX though. Java is the
only true object oriented language, so Python is not truly object
oriented and it's slow anyway. The future will be to .NET. Oh and XML
sucks! Python developers are above XML! And why doesn't Python have a
web framework like Ruby on Rails? Python has way too many web
frameworks, that SUX! And oh by the way, Ruby SUX!

Perl is way superior to Python as it outperforms it and it's more
readable. Indentation SUX! Depending on it is Barbaric, which is like
Cobol, which by the way, ROCKS!

The decorator syntax SUX! Why didn't they just use the ternary operator
syntax for it?? Oh, and Python really went downhill since version 1.5.2!

Python will not be a mature language if it doesn't add UNSIGNED INT,
SIGNED LONG and FLOAT to the language as basic data types. Oh, and any
language that doesn't have True Macros SUX.

Guido von Rossam is ITALIAN! And he SUX! I SUX TOO BUT I WILL NEVER
ADMIT TO IT EVER IN THIS WHOLE DISCUSSION, I will answer ANY argument
indicating that my arguments are fallacious and my behavior unreasonable
with the TRUTH, which is that you SUX.

Hah!

Martijn
 
S

Scott David Daniels

Martijn said:
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!!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top