difference between plain C and a full object oriented programming

M

mihai

I wander what is the penalty of speend for using object oriented
programming (C++) against the play C.

Have a nice day,
Mihai
 
R

Rapscallion

mihai said:
I wander what is the penalty of speend for using object oriented
programming (C++) against the play C.

No, the penalty of speend is always caused by the programmer. BTW, OO
programming is much harder than procedural programming.
 
E

E. Robert Tisdale

mihai said:
I wonder,
"What is the [performance] penalty
for using object oriented programming (C++)
instead of plain C?"

None.
Object oriented programming
is as good an idea in C as it is in C++.
C++ just makes it easier and more reliable
because it is an object oriented programming language --
it includes direct support for object oriented programming:
1.) encapsulation (actually, data hiding),
2.) inheritance and
3.) run-time polymorphism.

Of course, new C++ programmers create problems for themselves
when they try to use the new language features
in inappropriate situations.
As a rule, you should avoid doing anything in C++
that you wouldn't do in C.
 
P

Peter Julian

mihai said:
I wander what is the penalty of speend for using object oriented
programming (C++) against the play C.

Have a nice day,
Mihai

Both C and C++ can support OO programming. Consider this. Lets suppose you
have a bunch of classes or types that are related in some way. Who will be
faster? The non-OO language programmer that has to create a container for
each single type or the OO programmer that can use one container to store
all the types, including those derived types not yet created?
 

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

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top