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 | | | | re: C++: inherent conflict
Web Developer wrote:
[color=blue]
> Hi,
>
> Question: Why is there an inherent conflict between uncompromising
> efficiency and portability in C++?
>[/color]
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 | | | | re: C++: inherent conflict
"Web Developer" <nospam@hotmail.com> wrote in message
news:3f28bcfc_1@news.iprimus.com.au...[color=blue]
> Hi,
>
> Question: Why is there an inherent conflict between uncompromising
> efficiency and portability in C++?
>
>
> Regards
> WD
>[/color]
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 | | | | re: C++: inherent conflict
On Thu, 31 Jul 2003 16:23:49 +0930, "Web Developer"
<nospam@hotmail.com> wrote:
[color=blue]
>Hi,
>
>Question: Why is there an inherent conflict between uncompromising
>efficiency and portability in C++?[/color]
There isn't. It is easy to write code that is both portable and
efficient in C++.
Tom | | | | re: C++: inherent conflict
[color=blue][color=green]
> >Hi,
> >
> >Question: Why is there an inherent conflict between uncompromising
> >efficiency and portability in C++?[/color]
>
> There isn't. It is easy to write code that is both portable and
> efficient in C++.
>
> Tom[/color]
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 | | | | re: C++: inherent conflict
Web Developer wrote:[color=blue]
>
> Hi,
>
> Question: Why is there an inherent conflict between uncompromising
> efficiency and portability in C++?[/color]
That's a nice sweeping statement. What does it mean? Please back it up
with real examples.
Brian Rodenborn | | | | re: C++: inherent conflict
[color=blue]
> Web Developer wrote:[color=green]
> >
> > Hi,
> >
> > Question: Why is there an inherent conflict between uncompromising
> > efficiency and portability in C++?[/color]
>
>
> That's a nice sweeping statement. What does it mean? Please back it up
> with real examples.[/color]
Don't know what it means thats why I asked it.
WD | | | | re: C++: inherent conflict
"Web Developer" <nospam@hotmail.com> wrote...[color=blue]
>[color=green]
> > Web Developer wrote:[color=darkred]
> > >
> > > Hi,
> > >
> > > Question: Why is there an inherent conflict between uncompromising
> > > efficiency and portability in C++?[/color]
> >
> >
> > That's a nice sweeping statement. What does it mean? Please back it up
> > with real examples.[/color]
>
> Don't know what it means thats why I asked it.[/color]
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? | | | | re: C++: inherent conflict
"Victor Bazarov" <v.Abazarov@attAbi.com> wrote in message news:<viib2t5d5850e0@corp.supernews.com>...[color=blue]
> "Web Developer" <nospam@hotmail.com> wrote...[color=green]
> >[color=darkred]
> > > >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++.[/color]
> >
> > Unless it's a trick question,[/color]
>
> There is no question in Tom's two sentences. Unless yours was
> a trick question...[/color]
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. | | | | re: C++: inherent conflict
Web Developer wrote:[color=blue]
>[color=green]
> > Web Developer wrote:[color=darkred]
> > >
> > > Hi,
> > >
> > > Question: Why is there an inherent conflict between uncompromising
> > > efficiency and portability in C++?[/color]
> >
> >
> > That's a nice sweeping statement. What does it mean? Please back it up
> > with real examples.[/color]
>
> Don't know what it means thats why I asked it.[/color]
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 | | | | re: C++: inherent conflict
> > > Web Developer wrote:[color=blue][color=green][color=darkred]
> > > >
> > > > 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.[/color]
> >
> > Don't know what it means thats why I asked it.[/color]
>
> 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?[/color]
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 | | | | re: C++: inherent conflict
"Web Developer" <nospam@hotmail.com> wrote in message
news:3f2b4446_1@news.iprimus.com.au...[color=blue][color=green][color=darkred]
> > > > 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.[/color]
> >
> > 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?[/color]
>
> 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.[/color]
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 | | | | re: C++: inherent conflict
> >Capisce.[color=blue][color=green]
> >
> >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.[/color][/color]
Anyway,[color=blue][color=green]
> >I didn't get the concept so I posted it here.
> >
> >I believe there is an inherent conflict between efficiency and[/color][/color]
portability[color=blue][color=green]
> >in C++. The primary goal of C++ is to create efficient executable[/color][/color]
programs.[color=blue][color=green]
> >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[/color][/color]
of[color=blue][color=green]
> >the question and have gone off on a tangent.[/color]
>
> 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[/color]
You are right. This means there is something seriously wrong with this
question (from which I extracted from a c++ book).
WD |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,419 network members.
|