Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why C++ ???

Status
Not open for further replies.

isaisa

Programmer
May 14, 2002
97
IN
I am beginer in C++ reading some books. I am always in doubt that why to go for Object orientation instead of procedural approach ??? Is there any distict advantage that the procedural approach is lacking in ???
Please help.

Thanks in advance.
Sanjay
 
Well, the real problem with procedural code lies in creating large projects. Using objects, software is easier to maintain and reuse.

There are a great many things that object oriented software is distinguished for, but the bottom line is that if it is done well, it decreases development time.

When you can write a Class, and have it inherit from another class the majority of what you need it to do... well, you really saved yourself some time. CoolNameDenied
 
The world itself is "object-oriented," not procedural or anything else, so people tend to think in an object-oriented manner. When you model something in the world, it's usually conceptually easier to do it using objects.

OO programming also improves modularity and code-reuse, as CoolNameDenied pointed out, thus helping you work faster and more efficiently.
 
I want to add my vote for the two previous posts. I am a very good C programmer, and I still write low-level functions in C. But once I saw how C++ helps during design, development, maintenance, and reuse, I switched.

The benefit of C++ is productivity, in my opinion. No question there is a philosophical satisfaction from programming in a way that carves nature at its joints (object oriented), but even without that benefit, C++ when done correctly (and that in itself is a big caveat) makes an individual programmer, and an organization, more productive.

I still love C for its elegance and stark simplicity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top