C++ wins over C !!

K

Kieran Simkin

Paul said:
See this post, C seems to be loosing here
Are we still programming in C, just b'cause those mortals find it easy
to develop a C compiler than C++ compiler. Considering C++ can do
every thing that C can and Vice Versa is not true. then why C?
I personally like C, C is good but C++ is great.

http://groups.google.com/groups?hl=...e3e6.0408191850.1905d0ce%40posting.google.com

-Paul.

Is it really necessary to weigh everything up against everything else in an
attempt to determine value?

Please don't troll.
 
E

Erik de Castro Lopo

Paul said:
See this post, C seems to be loosing here

Define "losing".
Are we still programming in C, just b'cause those mortals find it easy
to develop a C compiler than C++ compiler.

Which mortals?
Considering C++ can do
every thing that C can

Not true. The folliwng snippet of code wont compile
with any C++ compiler I know of:

int main (void)
{ int new = 1, except = 2, throw =3;
return new * except + throw;
};
then why C?
I personally like C, C is good but C++ is great.

C++ is overly complicated. It tries to be a high level
language and a low level language and fails miserably
at both.

Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo (e-mail address removed) (Yes it's valid)
+-----------------------------------------------------------+
Open Source and Free Software means that you never sacrifice quality
of the code for meeting deadlines set up by people not participating
directly in the software development process.
 
P

Paul

Carter Smith said:
Languages are tools. Comparing C++ to C is like comparing a hammer to a
screwdriver. C has its uses and C++ has its uses.

Ben Kucenski
www.icarusindie.com

I agree with you folks, we can't compare every thing with every thing
else. But in my profession as a programmer, I many times encounter a
word "Portability" and a phrase "C is Portable across platforms". Some
of the projects in which I was involved where C++ is a best fit, my
boss chose C defeating us with that one word. This is just because not
all platforms have a C++ compiler. Then it makes me wonder is it a
right decision and why are we forced to use C just for the sake of
PORTABILITY (modular) where C++ (OOAD) would have been better.

Its like using a screw driver and fist to nail, instead of hammer.

-Paul
 
A

Augustus S.F.X Van Dusen

C++ is overly complicated. It tries to be a high level
language and a low level language and fails miserably
at both.

Indeed! I will never understand why Mr. Stroustrup apparently decided
that it would be easy for people to move from a procedural paradigm to an
object oriented one but, at the same time, they would have difficulties
adapting to a syntax better adapted to the latter. To me, moving from
syntax to syntax is easy; changing a way thinking, is not.

Apart from this rant, what makes Mr. Stroustrup a permanent member of the
Computing Hall of Shame is his decision to come up with a (purportedly)
high level language without automatic garbage collection. This is an
unforgivable decision.
 
F

Fredrik Tolf

See this post, C seems to be loosing here
Are we still programming in C, just b'cause those mortals find it easy
to develop a C compiler than C++ compiler. Considering C++ can do
every thing that C can and Vice Versa is not true. then why C?

Would you mind giving an example of something that is doable with C++
but not with C?
I personally like C, C is good but C++ is great.

I personally despise C++. It's just a lot of bloat that I never use
anyway. With C, on the other hand, I use almost the entire language (90%
of all constructs?) without ever feeling restricted. And that's the
thing - there's nothing you can do with C++ that you can't do with C,
and yet C is much lighter and leaner than C++.

Just my two cents - I have no wish two start a flamewar.

Fredrik Tolf
 
J

Joona I Palaste

Would you mind giving an example of something that is doable with C++
but not with C?

Or for that matter, giving an example of something that is doable in one
Turing-complete language but not another?
 
A

Ara.T.Howard

Indeed! I will never understand why Mr. Stroustrup apparently decided
that it would be easy for people to move from a procedural paradigm to an
object oriented one but, at the same time, they would have difficulties
adapting to a syntax better adapted to the latter. To me, moving from
syntax to syntax is easy; changing a way thinking, is not.

Apart from this rant, what makes Mr. Stroustrup a permanent member of the
Computing Hall of Shame is his decision to come up with a (purportedly)
high level language without automatic garbage collection. This is an
unforgivable decision.

amen!

the memory management complexities one can impose on oneself via deep object
trees is simply too great a burden for mere mortals to deal with safely - even
the best c++ programers i know admit spending nearly half of their debugging
time chasing memory errors. when good gc implemenations can be show to
produce __better__ and __faster__ code than hand coded memory management it
begs the question: "why should management decide to pay for this sillyness?".

regards.

-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it.
| --Dogen
===============================================================================
 
T

Thomas Matthews

Paul said:
I agree with you folks, we can't compare every thing with every thing
else. But in my profession as a programmer, I many times encounter a
word "Portability" and a phrase "C is Portable across platforms". Some
of the projects in which I was involved where C++ is a best fit, my
boss chose C defeating us with that one word. This is just because not
all platforms have a C++ compiler. Then it makes me wonder is it a
right decision and why are we forced to use C just for the sake of
PORTABILITY (modular) where C++ (OOAD) would have been better.

Its like using a screw driver and fist to nail, instead of hammer.

-Paul

Ok, so I'm feeding the troll.

I really don't understand. Perhaps you have a narrow field of
vision.

Both C and C++ and FORTRAN and LISP and a whole plethora of languages
are "portable" to other platforms. All projects have their line
between platform dependent and platform indepent code. These
sections really have nothing to do with Object Oriented Architecture
or Design (OOA / OOD). Object Oriented and procedural are just
different methods of how to get a task done. One could write the
platform dependent code using OO and the platform independent using
procedural. Hey, the wto pieces can be written in different language
too.

If one has a choice to select a language for a project, there are
many criteria for doing so; least of which is "X language is cool."
I choose the language that helps get the project done the fastest
with the best quality and readability. If the choice is LOGO, then
so mote it be.

I agree with you that not all platforms have compilers for all
the languages. If you language choice is COBOL, but there are
not compilers for the platform, you will have to choose another
language or develop the compiler yourself.

In my profession as a software developer, one does not care
about whether a language is better or not. Most of the time,
the language used cannot be changed. One has to make the
best of the situation and know how to accomplish the task
in the best manner. Often times, that does not involve wasting
time debating the advocacy of a a language.

Perhaps you should take this issue to a newsgroup with
"advocacy" in its name.


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
A

Arvind Varma Kalidindi

In my opinion C++ makes things utterly complicated. The only advantage
of C++ is that the language features( and requirements) make things a
bit easier for the programmer by enforcing rules that result in fewer
errors and thereby simplify the debugging process. But I guess, if a
programmer really writes code using his brain then C is much better.

Regards,
Arvind.
 
D

Dave Vandervies

Fredrik Tolf <[email protected]> scribbled the following:

Reference-counted garbage collection handled by the compiler.
(No, reference counting isn't a complete garbage collection mechanism,
but it's often Good Enough. Yes, this can be done in C, but only if the
programmer *always* remembers it, and there's no way to ask the compiler
to handle it instead.)

Or for that matter, giving an example of something that is doable in one
Turing-complete language but not another?

User interfacing. Name a user interface style, and I'll give you a
turing-complete language that doesn't support it.

(Turing-completeness is only suitable for discussing whether something can
or can't be computed by a specific computing model (anything computable
by any turing-complete model is computable by any other turing-complete
model); it doesn't say anything at all about how a program communicates
with the outside world, and doesn't shed any light on how easily or
effectively a given computation can actually be performed in using a
given model.)


dave
 
M

Minti

Augustus S.F.X Van Dusen said:
Indeed! I will never understand why Mr. Stroustrup apparently decided
that it would be easy for people to move from a procedural paradigm to an
object oriented one but, at the same time, they would have difficulties
adapting to a syntax better adapted to the latter. To me, moving from
syntax to syntax is easy; changing a way thinking, is not.



Stroustrup has never ever said that it is easier to move from procedural to
OOP. Everyone I know { including me from my own experience } agrees it is
difficult to do so. Even Stroustrup in his book and a plethora of other
places has openly said that it is quite difficult actually to move from C to
C++.

Apart from this rant, what makes Mr. Stroustrup a permanent member of the
Computing Hall of Shame is his decision to come up with a (purportedly)
high level language without automatic garbage collection.
This is an unforgivable decision.


You won't have said this if you have every worked on even a small project no
matter in what language. BTW Stroustrup is well respected no matter what you
say. Do you think that Java could have existed or come into being without
the paradigams established/follwed by C++. Java necessarily tries to take
the best of the features from the paradigams that existed at that time.

--
Imanpreet Singh Arora

Reply isingh AT acm DOT org.
If I would have only known, I would have been a locksmith.
-- Albert Einstein
 
M

Mike Wahler

Kieran Simkin said:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&newwindow=1&safe=off&thre
adm=d8b1e3e6.0408191850.1905d0ce%40posting.google.com&rnum=1&prev=/groups%3F
hl%3Den%26lr%3D%26ie%3DUTF-8%26newwindow%3D1%26safe%3Doff%26selm%3Dd8b1e3e6.
0408191850.1905d0ce%2540posting.google.com

Is it really necessary to weigh everything up against everything else in an
attempt to determine value?

What Paul is overlooking (or intentionally ignoring) is the fact
that like anything else, 'value' depends upon context.

-Mike
 
C

Christopher Benson-Manica

Default User said:
Another stupid language war troll.
*plonk* Paul
*plonk* thread

Agreed on both counts, although at least it wasn't crossposted.
 
M

Malcolm

Paul said:
See this post, C seems to be loosing here
Are we still programming in C, just b'cause those mortals find it easy
to develop a C compiler than C++ compiler. Considering C++ can do
every thing that C can and Vice Versa is not true. then why C?
I personally like C, C is good but C++ is great.
Firstly, you should be aware that this issue is constantly rehashed. However
it is neither off-topic nor a FAQ (though it maybe should be), and it does
raise a serious issue.

Firstly a C compiler is much easier to write than a C++ compiler, but this
isn't usually an issue. On a PC or similar platform a cheap C++ compiler is
always already available, and even for an embedded system it is often not
too difficult to adapt the GNU front-end.

The British army was offered an automatic rifle which would fire bursts of
bullets. This was rejected for a single-shot model. Why, you might ask? The
reason is that, in combat, whilst sometimes it is advantageous to be able to
fire a continuous burst, soldiers are likely to panic and waste ammunition.
So the option was actually considered a disadvantage.

The reason for rejecting C++ extensions is similar. There are times when
they prove useful. However if you give programmers the option then you will
often find that they play with the C++ language, trying out STL, or
exception handling, or different ways of defining constructors.

If you are doing an object-oriented design, then C++ is virtually necessary.
However for many projects, a procedural design is much quicker to do than an
object-oriented design, and much more natural. So it makes sense to reject
the C++ extensions.
 
G

Guillaume

If you are doing an object-oriented design, then C++ is virtually necessary.

It's not.
 
F

Fredrik Tolf

If you are doing an object-oriented design, then C++ is virtually necessary.

Certainly not. If you want proof of code in production state, just look
at Linux's VFS code, or any GNOME program.

Fredrik Tolf
 

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

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top