Linked by Eugenia Loli on Mon 10th Apr 2006 03:58 UTC
General Development Good news! Inheritance and polymorphism can facilitate more concise code, which reduces waste throughout the lifecycle of a C++ product. By pushing more generic code into base classes, you can help reduce application code clutter as well as cutting down on code duplication. In this article, software consultant Stephen Morris insists that less code means less testing, lower maintenance costs, and easier upgrades.
Order by: Score:
news?
by firl on Mon 10th Apr 2006 06:55 UTC
firl
Member since:
2006-03-16

I thought this was understood. I mean I have known about these concepts and the rationale behind them for some time now.

Reply Score: 1

RE: news?
by brewin on Mon 10th Apr 2006 07:53 UTC in reply to "news?"
brewin Member since:
2005-06-30

Add encapsulation and you've got the three basic criteria for OOP. Pretty well known I think...

Reply Score: 1

Call me skeptical...
by sean batten on Mon 10th Apr 2006 08:13 UTC
sean batten
Member since:
2005-07-06

...but is there some OSNews policy to link just about everything Informit publish regardless of its relevance or usefulness?

Reply Score: 5

What's the reason for this article?
by CodeMonkey on Mon 10th Apr 2006 09:09 UTC
CodeMonkey
Member since:
2005-09-22

The only people I can see this useful for is people who pretty much taught themselves C++ on the fly from examples. Any C++ programmer knows how to use polymorphism and inheritance. Even the lamest "teach yourself C++" book will go over inheritance. It's sort of a key idea in C++. Every body uses polymorphism but perhaps the "I taught myself C++" folks may just not know that it's called polymorphism.

Tis a sad sad day for programmers when already established software developers need to be told these things.

Reply Score: 4

Great News!
by betam4x on Mon 10th Apr 2006 12:58 UTC
betam4x
Member since:
2006-01-13

Great News! I saved $617 by switching to Geico!

Reply Score: 4

OO can lead to other pitfalls
by memson on Mon 10th Apr 2006 13:22 UTC
memson
Member since:
2006-01-01

Whilst polymorphism and inheritence (as well as encapsulation, cohesion etc) can lead to slightly shorter development times in a small team, it can lead to big headaches down the road. Poor documentation and lack of overall design are the two things the OO mantra still doesn't automatically handle. Without good foundations, the project will crumble no less quickly than a bad building in an earthquake.

Reply Score: 2

RE: OO can lead to other pitfalls
by Ronald Vos on Mon 10th Apr 2006 13:41 UTC in reply to "OO can lead to other pitfalls"
Ronald Vos Member since:
2005-07-06

Poor documentation and lack of overall design are the two things the OO mantra still doesn't automatically handle.

It's handled decently in Eiffel. Too bad the language encourages better documentation than the language has itself.

Reply Score: 1

Re: OO can lead to other pitfalls
by Chicken Blood on Mon 10th Apr 2006 16:31 UTC
Chicken Blood
Member since:
2005-12-21

Whilst polymorphism and inheritence (as well as encapsulation, cohesion etc) can lead to slightly shorter development times in a small team, it can lead to big headaches down the road. Poor documentation and lack of overall design are the two things the OO mantra still doesn't automatically handle. Without good foundations, the project will crumble no less quickly than a bad building in an earthquake.

This doesn't really have anything to do with OO per se. Poor documentation and lack of design will cripple any project. OO will give you the tools for good design. It can't do the good design for you.

Now if you have good OO design, it will bring productivity in spades.

Edited 2006-04-10 16:31

Reply Score: 1

Good News
by sbenitezb on Mon 10th Apr 2006 19:13 UTC
sbenitezb
Member since:
2005-07-22

Good News! errr... I needed to publish something...

Reply Score: 0

Re: OO can lead to other pitfalls
by sanders on Tue 11th Apr 2006 07:23 UTC
sanders
Member since:
2005-08-09

Just like procedural programming can lead to 1000-line functions making your code unmaintainable, overzealous OO-ers tend to cripple the project by making dozens of classes which are essentially the same, "just in case".

IMHO this is even worse than the 1000-line function, because there at least you can lock yourself in your office and read it, whereas the 10-levels-of-inheritance-all-adding-nothing will make you lose the overview very quickly.

Reply Score: 1