473,809 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1871
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*********@gm ail.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.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
2930
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 programming?
34
7120
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. Yensao
11
9283
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 C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
65
4297
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 completely independent of each other except for their well-defined interfaces. This was an attempt to explain the gist of OOP to programmers accustomed to the structured programming paradigm. I tried to explain OOP in terms of ideals that can be...
14
1656
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 more localized in C++ than C, which mean changes won't propogate far away in C++ code. By reusing through inherence and overloading, a lot of code can be saved. But I have to use C for some reason. Is there any programming paradigm in C, which...
45
4172
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 need to post a question.
7
1764
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
5969
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 site at http://ldeniau.web.cern.ch/ldeniau/html/oopc/oopc.html. The approach is very instructive. I know that I could do much of this stuff with e.g. C++, but the intellectual challenge of implementing these concepts with pure ANSI C is relevant to...
3
9631
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 was wonderinmg what is the diffrence between object oriented and procedural programming. Can anyone of you, please, let me know the difference as soon as possible. Thanks and regrads, KiranJyothi
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9602
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.