473,472 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

C++: inherent conflict

Hi,

Question: Why is there an inherent conflict between uncompromising
efficiency and portability in C++?
Regards
WD

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 24/07/2003
Jul 19 '05 #1
12 3455
Web Developer wrote:
Hi,

Question: Why is there an inherent conflict between uncompromising
efficiency and portability in C++?


Homework?

I'm not aware of such a conflict. And the importance of efficiency is
very overstated most of the time. Good design is much more important and
offers more advantages. What good is a fast program if it's buggy, late,
and impossible to maintain? On the other hand, a well-designed program
can be optimized more easily (assuming there's a need - well-designed
software should be very efficient from the start), and can be ported to
faster hardware if needed. Good design gives (nearly) the best of all
worlds. *That* should be your focus, not efficiency.

-Kevin

Jul 19 '05 #2

"Web Developer" <no****@hotmail.com> wrote in message
news:3f********@news.iprimus.com.au...
Hi,

Question: Why is there an inherent conflict between uncompromising
efficiency and portability in C++?
Regards
WD


Whenever you take an uncompromising position you are asking for conflict,
that's life isn't it?

All languages have a conflict between efficiency and portablility, because
programs must run in different environments. They can be made efficient for
one particular environment but only at the cost of being less efficient or
unportable on a different environment.

john
Jul 19 '05 #3
On Thu, 31 Jul 2003 16:23:49 +0930, "Web Developer"
<no****@hotmail.com> wrote:
Hi,

Question: Why is there an inherent conflict between uncompromising
efficiency and portability in C++?


There isn't. It is easy to write code that is both portable and
efficient in C++.

Tom
Jul 19 '05 #4
Hi,

Question: Why is there an inherent conflict between uncompromising
efficiency and portability in C++?


There isn't. It is easy to write code that is both portable and
efficient in C++.

Tom


Unless it's a trick question, which i doubt very much, then your seriously
mistaken.

What do you understand by the term portable? maybe thats your confusion.
WD

Jul 19 '05 #5


Web Developer wrote:

Hi,

Question: Why is there an inherent conflict between uncompromising
efficiency and portability in C++?

That's a nice sweeping statement. What does it mean? Please back it up
with real examples.


Brian Rodenborn
Jul 19 '05 #6
Web Developer wrote:

Hi,

Question: Why is there an inherent conflict between uncompromising
efficiency and portability in C++?

That's a nice sweeping statement. What does it mean? Please back it up
with real examples.


Don't know what it means thats why I asked it.
WD

Jul 19 '05 #7
"Web Developer" <no****@hotmail.com> wrote...
Web Developer wrote:

Hi,

Question: Why is there an inherent conflict between uncompromising
efficiency and portability in C++?

That's a nice sweeping statement. What does it mean? Please back it up
with real examples.


Don't know what it means thats why I asked it.


You're contradicting yourself. You asked "why <something>", thus
implying that you already accepted the existence of <something>,
and are now looking for reasons. Now you're backing out of your
own statement by saying that you don't understand what <something>
means. It's like if I asked "why can crayfish fly?" It is not
possible to answer because it is built on a wrong preposition (that
crayfish can fly). The same with your question. First you show
us what is the "inherent conflict", prove to us it exists, then we
can speculate for the reasons for it to exist. Capisce?
Jul 19 '05 #8
"Victor Bazarov" <v.********@attAbi.com> wrote in message news:<vi************@corp.supernews.com>...
"Web Developer" <no****@hotmail.com> wrote...
>Question: Why is there an inherent conflict between uncompromising
>efficiency and portability in C++?

There isn't. It is easy to write code that is both portable and
efficient in C++.


Unless it's a trick question,


There is no question in Tom's two sentences. Unless yours was
a trick question...


It seems fairly obvious that the original question was a homework
assignment in which case there's always the possibility that the
instructor gave a "trick question", i.e., one with a deliberately
false premise.

More likely, though, the instructor actually believes there is
such an inherent confict between efficiency and portability.

The instructor is probably thinking of cross-platform libraries
vs. platform-specific APIs, but this is (1) outside the scope
of standard C++, (2) not an issue for all applications, (3) not
necessarily true even in this more limited context (i.e.,
"high level" != "inefficient"), and (4) probably bad advice for
most programmers (i.e., premature optimization).

My advice to the original poster is this. If you want to please
your instructor, review your notes (or someone else's if you
haven't been attending class -- shame one you!), and parrot
whatever half-truths your instructor has passed off on you.

On the other hand, if you want to actually learn, then don't
just ask for a quick answer. Try to answer it yourself. Look for
gaps in your understanding (e.g., "what does portability mean?")
then read and/or search the internet to find answers. Ask probing
questions of yourself. Read the FAQs for relevant newsgroups.
(Note the plural. Just because you're programming in C++ doesn't
make every question a C++ question.) If you do all that and still
can't figure something out, post a specific question to an
appropriate newsgroup.
Jul 19 '05 #9


Web Developer wrote:
Web Developer wrote:

Hi,

Question: Why is there an inherent conflict between uncompromising
efficiency and portability in C++?

That's a nice sweeping statement. What does it mean? Please back it up
with real examples.


Don't know what it means thats why I asked it.

That is NOT what you asked. You asked why is there an inherent conflict,
not whether there is an inherent conflict. From the other post about not
getting "hello world" to work, I think you should concentrate on
learning the language first rather than philosophical questions. You
have a lot of work ahead of you.


Brian Rodenborn
Jul 19 '05 #10
> > > Web Developer wrote:
>
> Hi,
>
> Question: Why is there an inherent conflict between uncompromising
> efficiency and portability in C++?
That's a nice sweeping statement. What does it mean? Please back it up
with real examples.


Don't know what it means thats why I asked it.


You're contradicting yourself. You asked "why <something>", thus
implying that you already accepted the existence of <something>,
and are now looking for reasons. Now you're backing out of your
own statement by saying that you don't understand what <something>
means. It's like if I asked "why can crayfish fly?" It is not
possible to answer because it is built on a wrong preposition (that
crayfish can fly). The same with your question. First you show
us what is the "inherent conflict", prove to us it exists, then we
can speculate for the reasons for it to exist. Capisce?


Capisce.

The question was extracted from a book which will remain nameless for the
time being. I don't believe it was intended to be a trick question. Anyway,
I didn't get the concept so I posted it here.

I believe there is an inherent conflict between efficiency and portability
in C++. The primary goal of C++ is to create efficient executable programs.
In order to achieve this, C++ programs must be compiled into machine
language (platform dependant), which is not portable to different
architectures. My answer is similair to the first response I got from my
original post. The rest seem to have misunderstood the nature and meaning of
the question and have gone off on a tangent.
WD


Jul 19 '05 #11
"Web Developer" <no****@hotmail.com> wrote in message
news:3f********@news.iprimus.com.au...
> Web Developer wrote:
> >
> > Hi,
> >
> > Question: Why is there an inherent conflict between uncompromising
> > efficiency and portability in C++?
>
>
> That's a nice sweeping statement. What does it mean? Please back it up
> with real examples.

Don't know what it means thats why I asked it.


You're contradicting yourself. You asked "why <something>", thus
implying that you already accepted the existence of <something>,
and are now looking for reasons. Now you're backing out of your
own statement by saying that you don't understand what <something>
means. It's like if I asked "why can crayfish fly?" It is not
possible to answer because it is built on a wrong preposition (that
crayfish can fly). The same with your question. First you show
us what is the "inherent conflict", prove to us it exists, then we
can speculate for the reasons for it to exist. Capisce?


Capisce.

The question was extracted from a book which will remain nameless for the
time being. I don't believe it was intended to be a trick question. Anyway,
I didn't get the concept so I posted it here.

I believe there is an inherent conflict between efficiency and portability
in C++. The primary goal of C++ is to create efficient executable programs.
In order to achieve this, C++ programs must be compiled into machine
language (platform dependant), which is not portable to different
architectures. My answer is similair to the first response I got from my
original post. The rest seem to have misunderstood the nature and meaning of
the question and have gone off on a tangent.


You don't know what it(whatever it is) means, but you believe it
should be something in your imagination? It's just pointless.
You'd better tell what's in your mind clearly instead of asking
for other's opinion on a statement from a mysterious book.

--
ES Kim
Jul 19 '05 #12
> >Capisce.

The question was extracted from a book which will remain nameless for the
time being. I don't believe it was intended to be a trick question. Anyway,I didn't get the concept so I posted it here.

I believe there is an inherent conflict between efficiency and portabilityin C++. The primary goal of C++ is to create efficient executable programs.In order to achieve this, C++ programs must be compiled into machine
language (platform dependant), which is not portable to different
architectures. My answer is similair to the first response I got from my
original post. The rest seem to have misunderstood the nature and meaning ofthe question and have gone off on a tangent.


This isn't what portability means in language terms. C++ is
source-code portable. You can take the same (efficient) source code,
and compile it on and for different machines, from mainframes to
washing machines.

Tom


You are right. This means there is something seriously wrong with this
question (from which I extracted from a c++ book).
WD
Jul 19 '05 #13

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

Similar topics

0
by: Adam | last post by:
Hi I had Ruby 1.6.8-8 for Windows installed on my WinXP Pro machine prior to installing Python 2.3. After installing Python 2.3, I tried to <----- screen output of python interactive command...
0
by: VHR | last post by:
Hi, I apologize for posting this a second time, but no one replied from the other group where I posted it. I have a design master and 4 replicas that I have successfully synced on about 4-5...
0
by: vb | last post by:
Hi, Sorry, I am new to C#, so this can be a very simple question. I am using some of DevExpress components in my application.My References in the Solution(for DevExpress) are: DevExpress.Data;...
4
by: crystal | last post by:
I've checked the threads but haven't been able to come up with a solution to my issue. Help...... I have a simple form based on a table. Within the form is a subform that is also, through a Q,...
1
by: lorirobn | last post by:
Hi, I have a query that I have been using as a record source for a form with no problems. I just created a new "addnew" form, and added 20 records to the table with this form. The problem I...
14
lotus18
by: lotus18 | last post by:
Hello World I have a problem in detecting the conflict schedule (Day and Time). Day 1. M 2. T 3. W 4. TH 5. F
14
lotus18
by: lotus18 | last post by:
Hello all I have these records on my Day Table for my complete database table please click here 1. M 2. T 3. W 4. TH 5. F 6. S
0
by: =?ISO-8859-1?Q?Gerhard_H=E4ring?= | last post by:
egbert wrote: No, it's just like every other database error - the command fails but the connection is left untouched. Sure, the successful ones ;-) FWIW, this restriction is not any...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
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...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.