473,395 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

difference between plain C and a full object oriented programming

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

Have a nice day,
Mihai

Jul 23 '05 #1
4 1844
mihai wrote:
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.

Jul 23 '05 #2
mihai wrote:
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.
Jul 23 '05 #3
mihai wrote:
I wander what is the penalty of speend for using object oriented
programming (C++) against the play C.


None whatsoever.
Jul 23 '05 #4

"mihai" <Mi*********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
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?

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin | last post by:
When was inheritance intruduced into object oriented programming? More generally, does anyone know or have any sources on when the different features were introduced into object oriented...
34
by: yensao | last post by:
Hi, I have a hard time to understand difference and similarities between Relational database model and the Object-Oriented model. Can somebody help me with this? Thank you in advance. ...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
65
by: Roger Smythe | last post by:
A means for the progressive decomposition a problem space into increasingly simpler component parts such that these component parts represent higher levels of conceptual abstraction, and are...
14
by: PengYu.UT | last post by:
Hi, I have been using C++ a lot and I've almost forgot what syntax is support by C and what syntax is support by C++? My feeling is that C++ gives programmer much flexibility. And the code is...
45
by: Lindsay | last post by:
I was just reading another post when someone commented that the code was C and not C++. What are the differences? (Examples?) The answer does not affect my programming but would help to know if I...
7
by: Bart_D | last post by:
Hi, Can anybody explain me what's the difference between for example: imports system.data implements ICallbackEventHandler inherits System.Web.UI.Page Thanks Bart
47
by: Thierry Chappuis | last post by:
Hi, I'm interested in techniques used to program in an object-oriented way using the C ANSI language. I'm studying the GObject library and Laurent Deniau's OOPC framework published on his web...
3
by: KiranJyothi | last post by:
Hi All, I am new to the software languages and wanted to learn C++. It seems that C++ is neither(completely) an object oriented programming nor(completely) a proceduarl programming. So, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.