PDA

View Full Version : Learning C or C++ ?



Xoid
04-01-2003, 06:15 PM
Do you think it's worth learning C before C++ or just take the plunge and jump to the superset?

SourceCode
04-01-2003, 06:22 PM
It is good to know both of course but picking one and sticking with it is the most important thing. C is easier to learn than C++ because their are less features in C. It's really up to you heh.:) Not sure if it is worth learning C before C++ though, the creator of C++ says it is not, but hey that's just his opinion:)

stumon
04-01-2003, 06:24 PM
Thats something you will have to decide on your own. Some say its easier to learn C then C++. Others say its pointless to learn C because its notused as much as C++. Others say that its harder to learn C then C++ becuase even though the syntax is a lot alike, there are differences in the way things are done. I say, dont depend on someone else making that decision for you, if you have time, learn both, it will only help you later.

Silvercord
04-01-2003, 09:15 PM
just go right into C++. For all intents and purposes once you've learned C++ you will have learned C as well (you'll be able to read and understand C code if you can read and understand C++ code).

ammar
04-02-2003, 12:33 AM
If you don't have a problem learning them both, just learn whatever you need to learn, or whatever you are being asked to learn, otherwise learn them.

Xei
04-02-2003, 12:53 AM
Depends. C is used in Embedded systems alot more than C++. In either case, I find that I use C-compatible code with C++. I think that its best to try to keep your syntax portable within both languages. But you make up your own mind.

Shiro
04-02-2003, 11:05 AM
>Do you think it's worth learning C before C++ or just take the
>plunge and jump to the superset?

C and C++ are different language. If you want to learn C, then learn C, if you want to learn C++, then learn C++.

Vber
04-02-2003, 11:23 AM
they're different, but very close one to each other, not for joking is called c++ and even not for joking c++ is a superset of c. My opinion, learn C before, C++ isn't so easy (neither C).

Shiro
04-02-2003, 11:57 AM
>My opinion, learn C before, C++ isn't so easy (neither C).

The languages may look a lot like eachother and yes, C++ has a basis in C, but the main difference is not the languages itself, but the use of it. C++ is usually used to do object oriented programming and C is usually used to do procedural programming. So learning a programming language is not only just learning the language, but also learning a way of programming. That is the reason why, in my opinion, C++ and C are quite different languages.


>Or you could skip both of them and learn Java.

Java is a nice language. You can skip whatever language you like and learn some language. Just do the thing you like to do most.

Vber
04-02-2003, 01:38 PM
Shiro, you're correct man, of course they're differents, I'm just trying to show that some people think that learning C is wasting time, and goe's learning C++ without knowing what's programming, maybe I'm not someone with a little bit experience to talk, but, for me at least, learning C isn't waste of time, I really like it.

Yawgmoth
04-02-2003, 01:41 PM
I would reccommend that you learn C++ and don't bother w/C unless you have alot of time on your hands. C++ is basically a better C w/OOP and some other features. Plus I've heard that those who learn C before C++ have a hard time learning C++ cuz what is considered "good" programming practice in C is "bad" for C++.

CompiledMonkey
04-02-2003, 02:36 PM
I would recommend Java over both of them.

adrianxw
04-03-2003, 01:03 AM
>>> recommend Java over both of them.

Yes, you would, however, the original questioner was asking if he should learn C before learning C++, so it is not a helpful suggestion really is it?

CompiledMonkey
04-03-2003, 10:49 AM
Originally posted by adrianxw
Yes, you would, however, the original questioner was asking if he should learn C before learning C++, so it is not a helpful suggestion really is it?

Maybe he hasn't been exposed to Java. Maybe he's only heard the blind acceptance of C/C++ by you folks. Maybe he should skip C and C++ to learn a language designed for OOP. Maybe, oh just maybe...

Yawgmoth
04-03-2003, 11:54 AM
Originally posted by CompiledMonkey
Maybe he should skip C and C++ to learn a language designed for OOP.

C++ is not designed for OOP?!? Last time I checked it was.



Maybe he's only heard the blind acceptance of C/C++ by you folks. Maybe, oh just maybe...
We aren't "blindly accepting" C/C++. We're merely answering his question w/o straying off topic.

And has it ever occurred to you that maybe he DOES know about Java, and chose to do C/C++ anyway? Maybe oh maybe...

CompiledMonkey
04-03-2003, 11:58 AM
Originally posted by Yawgmoth
C++ is not designed for OOP?!?

Not like Java, no.


Originally posted by Yawgmoth
And has it ever occurred to you that maybe he DOES know about Java, and chose to do C/C++ anyway? Maybe oh maybe...

But how do we know either way? Should I not mention other alternatives and just assume he knows everything out there? No.

adrianxw
04-03-2003, 12:28 PM
>>> Maybe, oh just maybe...

... maybe he, hmm, hey, <fx>sniff sniff</fx>, hey, is there a troll in here?

CompiledMonkey
04-03-2003, 01:16 PM
Just because I don't agree with your opinions, I'm a troll?

Vber
04-03-2003, 01:19 PM
No, it's because the topic was about C/C++ and you joined with Java, the guy didn't say he want to learn Java. This that you think java is better then C/C++ it's your problem, well, the world in general thinks else...

frenchfry164
04-03-2003, 05:24 PM
it depends on what you are doing on whether you should use Java or C++. Or so they say. I believe there is NO use for Java. Not that I don't like the language, just that C++ is usually a lot faster, and is as easy-to-use as Java, IMHO.

And making the statement that Java is more suited for OOP is foolish. I believe Java can use OOP just as well as C++. And exists mainly because people wanted OOP.

Govtcheez
04-03-2003, 05:28 PM
Originally posted by frenchfry164
I believe there is NO use for Java. Watch it... It's those kind of narrow-minded statements that'll get you into trouble.

Chris, I know you love acting the part of "righteous Java defender", but do it somewhere else. The guy didn't ask a damn thing about Java, or even OOP. Your opinion's your own, and that's fine, but it really doesn't have a bearing on this conversation. There're a lot of things I like, but I didn't choose to come in here and post about them jsut because I do.

CompiledMonkey
04-03-2003, 06:50 PM
Originally posted by Govtcheez
Chris, I know you love acting the part of "righteous Java defender", but do it somewhere else.

Maybe a year ago, yeah. But not now. Actually, I don't even like Sun anymore. I wish IBM was the owner of Java. Secondly, I use whichever tool is right for the job. I love C myself, its speed rules me. But many of my everyday tasks wouldn't be suited for C, rather Java/J2EE. If I can use C#, I'm on it. It just depends on what I'm doing.


Originally posted by Govtcheez
The guy didn't ask a damn thing about Java, or even OOP.

I would think someone would want to learn a language that does something best. Against what you guys say, Java is more suited for OOP. Even in the design of the language, it's all OOP. How can you expect to learn a language like C++ and not get into OOP? Why would someone limit themselves like that? So, since I know Java is better for OOP, I suggested it. Jeebus people, get a grip. :D

Shiro
04-04-2003, 11:29 AM
Shiro, you're correct man, of course they're differents, I'm just trying to show that some people think that learning C is wasting time, and goe's learning C++ without knowing what's programming, maybe I'm not someone with a little bit experience to talk, but, for me at least, learning C isn't waste of time, I really like it.


I didn't say learning C is a waste of time, in fact, learning whatever language is not a waste of time. What I meant was that learning C is not necessary before learning C++. And one can learn C++ without knowing what is programming. Learning a language and learning programming is something which is done at same time. But which way of programming one learns depends on which language one is learning.

If one starts learning C, one learns programming procedural. And when one learns C++, one can learn both, but most courses only teach object oriented programming when it comes to C++.



I would think someone would want to learn a language that does something best.


I think that is not the case in this thread, the case here is that the original poster needs or wants to learn C++ and wonders if he/she should learn C before.



Why would someone limit themselves like that?


The original poster did not say that he/she doesn't want to learn Java. Sure, it is a nice language. But not applicable in this thread.

I don't think there is a "better" language. For certain applications, certain languages are more suitable. That is why applications are in a lot of cases written in several languages. I'm working in the field of embedded systems where sometimes systems are build using assembler, C, and Java together, or other configurations of languages. You don't write an OS in Java and most manufacturers of consumer electronics today prefer building the applications of the system onto a Java virtual machine so that they can reuse the applications on a family of applications and do nice things like remote updating etc.

Vber
04-04-2003, 11:33 AM
>>I didn't say learning C is a waste of time
and I didn't say you say this :)