Choose -- C or C++ or both
Printable View
Choose -- C or C++ or both
I choose C. LONG LIVE C.
--Garfield
C++ was my first language. I'm most comfortable with that than C.
i love C++. may it live long and prosper.
Definately both. C++ is more fun to work with because the code is more ellegant and managable, and C programmers still own the muscles.
> C programmers still own the muscles.
Don't forget that.
last time i went to the supermarket, they weren't selling muscles...unless, of course, you are talking about those little black clam-like things.
that was proof:
C++ is all you ever need to know.
I don't get it, gamegod. What does that mean?
> C++ is all you ever need to know.
[correction]
C is all you ever need to know.
[/correction]
well, you don't need one for the other, and C++ is much more versatile and i like it more than C, so, it is all you need to know.
> i like it more than C
I LOVE C. C is the perfect language. Leading in development.
But, we are allies (C and C++). We do not fight. We fight others (Visual Basic preferably). Let us unite.
Join the C force!
--Garfield
Yes, down with the evil microshaft powered machine that is VisualBasic! C languages forever!
> get it?
Yeah. I don't think it's great though. I LOVE C.
> Yes, down with the evil microshaft powered machine that is VisualBasic! C languages forever!
Yes, let us unite against the evil forces.
Each langauge has their own uses, but C++ can do pretty much everything C can do, and do more.
they don't stand a chance against our cumulative millitary might.
> they don't stand a chance against our cumulative millitary might.
C/C++ OVERPOWERS!!!
--Garfield
We have the Neutron Bomb, we have the A-Bomb, we have Anthrax, we have Seryn Nerve Gas, we have the Suplex, we have the Powerbomb, we have The Rock on our side. We shall be victorious.
I use both, even sometimes in the same program!
like this
for(int a=0;i<100;i++) //You can only do this on C++
{
printf("%d",a); //This is C (well, I think)
}
or maybe
int b;
for(b=0;b<100;b=b+1) //I'm not really sure if you can use ++ in C
{
cout << b; //This is C++
}
but I definetly use classes, specially for windows programs
Oskilian
Without C there would be no such thing as C++. Also C is undeniable because it is the native language of the operating system. It is the most powerful language. The great thing about C++ though is that it is a much better language for developing high level applications because of the OOP design, basically comes down to better program design, except not for low level programming!
Ditto that Troll_King. Couldn't have said it better myself.
"Also C is undeniable because it is the native language of the operating system"
I didn't know this. So then there were no operating systems before C came around? Nor are there any operating systems not written in C?
I was also under the impression that you could do all the low level stuff you wanted with C++.
i just want to say to gamegod:
functions as class members is hardly the main advantage of C++ over C. As you can see, the same effect is accoplished using a C compiler with the above code...Code:struct A {
int a;
int (*member_b) (); //pointer to function
};
SilentStrike's right, you can do anything in C++ that can be done in C. Performance hits are insignificant, and depend largely on the programmer. i've sure seen some pathetically slow crap written in C. Plus the hits are basically insignificant when you weigh the advantages of OOP. This arguement is tired. Why do people resist inovation? C++ has been around for almost twenty years, and yet people still don't understand it's benefits.
Name an operating system that isn't written in C?
> i've sure seen some pathetically slow crap written in C
This is not the language, it's the programmer. If the programmer write efficient code, then the program runs fast. If he doesn't, well then it won't run fast or how you want it to. This has nothing to do with the language.
well.. it does depend somewhat on the language, i.e. DarkBasic, the slowest piece of programming babble every set for to the world. or think of assembly, that will run faster optimized than C optimized with the basic same amount of code.
i dunno, i'm not an expert on this. I'm sure some of you guys can prove me wrong.
> DarkBasic
Oh, I've never heard of that version of BASIC. How many versions are there? And why?
--Garfield
> and why?
My thought exactly.
BASIC is dead! live with it!
> BASIC is dead!
After C was designed, BASIC never lived.
hehe.. people should write stuff in the form of C, not in the form of basic.
I'm sick of working with sucky basic clones that promise lots but never work out.
<This is not the language, it's the programmer. If the programmer write efficient code, then the program runs fast. If he doesn't, well then it won't run fast or how you want it to. This has nothing to do with the language.>
yeah, that' s pretty much what i was trying to say. Maybe i was unclear. Those who still hold on to C-style code often say that C++ is bloated and slow. That C holds the real "muscle". I was simply saying that this was not correct. As you correctly point out, the programmer impacts the speed and size of the code far more than the choice between C and C++. C++'s obvious benefits outweigh the insignificant performance issues.
obvious benefits?
c can do most of the things c++ does just as well creating an executable that will at least match the speed of the c++ equivalent :)
a lot of the stuff you use in c++ you don't really need...
<a lot of the stuff you use in c++ you don't really need...>
I need all the stuff I use in C++. Your response pretty much proves my point. Those who defend C by saying the added tools in C++ are pointless don't really understand Object Orientation. They simply see as a useless obsticle--something else to learn.
I don't know what they're doing in Canada, but in the US (form what i'm told in school anyway) a majority of Software Engineering utilizes OOD&P which is the "useless" stuff C++ adds to C.
I've learned a bit about oop. Certainly useful for data containers. Inheritence of all types looks complex and useful when seen in source files.
Given that it can sometimes be nice to drop in, for example, an HTTP_PI object into your code to give instant http protocol interpretation, and it will look good, but really it's a choice of using functions as arguments to data and using data as functions of arguments, if you see what I'm saying...
http_pi inst;
inst.interpret(request);
vs.
http_pi inst;
http_pi_init(&inst);
http_interpret(&inst, request);
the top is shorter and the code sort of directly translates to how things would work in the ideal world (dropping objects into bins to make programs :/), I prefer the bottom in a lot of cases because then I see *everything* that happens, I know how every bit works and everything is coming together.
And how do you replicate the kind of neat stuff that dup2 and fork() have to offer with streams, eh? :)
You don't have to use it, but with C++ you've got the option.Quote:
a lot of the stuff you use in c++ you don't really need...
If you wrote the http_pi class then you would, but if it was part of a third party library then you've no need to know exactly how it works. If you were using a third party c library you probably wouldn't know what was happening in the functions.Quote:
I prefer the bottom in a lot of cases because then I see *everything* that happens, I know how every bit works and everything is coming together.
I'm thinking more like in terms of specifying every action.. every allocation, every free. Sorta prefering to keep track of my own pointers rather than let the garbage collector do it, that's the sense I'm talking about.
You do specify every action, but within a class (if you want to use classes). C++ doesn't have an in-built garbage collector.
ggs,
check out the following link on the encapsulation of fork and dup2:
http://www.csse.monash.edu.au/~damia...html/text.html
you know what? i think in OO terms, so C++ is a better choice for me... it better suits my lines of logic and i work better with it. I'm not saying that you should all of a sudden denounce your previouse relations with C, all i'm saying is that it's better for me, and i prefer it and benefit from it. Just be smart.
Hmm...In my opinion, they're almost alike, except C++ has classes...No offense to C users...But I like C++ better. :)
join the club, brother
de-ja-vous... i remember seeing that exact same post before in this thread... i'm allitle too lazy to look back and post a big "a-hah, i havst found thee!" thing...
i guess that's just too bad for you.
<I knew about pointers to functions, I think it is slopy, to point to your function.>
i agree, it's much nicer to let the technology (compiler) do the nasty work for you. I was simply saying that functions can be "grouped" within structures using C, and there's more to C++ than member functions...;)
Whatever you do, do not ever choose assembly!
Actually I voted for both, not one or the other. Also I've had enough with the nonesence attacks on me. My points still stand. All major operating systems in the world were written in C except for a few high level components. The system API is written in C (Win32). These are the facts of life.
As far as C++ goes, no it is not a managed language. This means that the programmer has the freedom and vulnerability of managing his own code. There is nothing built in to fix your mistakes. Also, I know OOP. I have used encapsulation, inheritance, and polymorphism. I am currently reading 'Effective C++ second edition'. I would rather work with objects than having to document the flow of data and processes through the whole program. It's easier to work with objects. The code is also less redundant. I intent to write high level applications. C++ or even perhaps a managed language like C# would be my choice, but I would hate to go without C because it is necessary to know your operating system and the sytem API.
Just like I voted for both, I intend to use both! Never have I stated anything different.
Screw C and C++ everyone knows that VB rules!
VB!
VB!
VB!
VB!
*Hey, who are you?*
*What? You say C++ rules?*
*VB is better!*
*What are you doing with that acid?*
*Hey get that away from me!!!*
*AHHHH!!!!!!*
I voted for both.... love them both.
why?Quote:
Originally posted by Nick
Whatever you do, do not ever choose assembly!
and by the way: I like all programming languages because each one is good for one thing, for example, VB has a very good Database capabilities, and Assembler is very good too, specially for writing fast programs. C is good for DOS programs (and maybe windows too), and C++ is very OOP.
Oskilian
Is this a joke?Quote:
C is good for DOS programs (and maybe windows too
C is my first language and still I'm confident about C.
But in future I will love to programme in C++ because of the OOP implementation. I'm learning C++.
I think C family (C & C++) is the super power in Programming Language and I guess will remain at least 10 years more.
since C++ is a modified/enhanced/extended version of C i'm sure there shouldn't be any doubts which is the better one.:)
The bottom line [imho] is
C++ RULES
>Whatever you do, do not ever choose assembly!
Assembly is a great way of learning how you're machine really works. And a much greater advantage of knowing assembly is that with assembly you can do very low level stuff which you can't do with higher languages.
>Screw C and C++ everyone knows that VB rules!
Is this a joke?
I agree with oskilian. Every programming language has some application field in where it is better then some other language.
>C is my first language and still I'm confident about C.
C is a great language, I use it for many years now and in many kinds of applications and I'm still very confident.