ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Is it a good idea to learn C before C++?
I was just wondering what your opinions were on this. I have heard that it is a good idea to Learn C before C++. But I also have heard from other sources that it is not a good idea to learn C before C++.
If you are going to program in C, learn C. If you are going to program in C++, learn C++. Having learned C first, it was easy for me to pick up C++, but it still took me a long time (as if starting from scratch) to program in a "real" OO way, as opposed to C run through the C++ compiler.
If your interest lies in language design, by all means learn C as well, plus Objective C, Java, and C#.
it doesn't really matter, imo, but if you take a beginner's c++ programming course at a uni or junior college, you do invariable learn some c in the process.
I love C, C is maybe one of the nicest programming luanges there is.. you can do anything you want with it.. yes its a small, yes its tricky, but its sure fun..
I still voted that you shouldnt learn C first.. I did, it screwedup my OO thinking for years. Learn C++ first, thats where you get the (work) done.. lean C to get your cool home stuff running ;-)
Originally posted by worldmagic
I love C, C is maybe one of the nicest programming luanges there is.. you can do anything you want with it.. yes its a small, yes its tricky, but its sure fun..
I still voted that you shouldnt learn C first.. I did, it screwedup my OO thinking for years. Learn C++ first, thats where you get the (work) done.. lean C to get your cool home stuff running ;-)
Having learned object - oriented programming first, I'd say it doesn't matter because every project is different, so if it were me, I learned OO first then ventured to structured programming. It's really up to your own purposes.
Learning C first or C++ first, you will end up learning C.
Why? Because real C++ means "class" and "objects" and it's a real complex object oriented programming which is not really appropriate for the beginners.
No C++ beginners' books or course teach you that real C++ concepts straight away. They will teach you the procedure C feature of the C++ first.
So even If you learn C++ first,(learning by reading books or taking a course), you will learn only the C feature of the C++, meaning it's the same as C.
So no matter which one you start learning C or C++, you will actually start learning C.
Last edited by moeminhtun; 10-29-2003 at 11:32 PM.
Originally posted by oopicmaster Because of the mistakes made by the designers of C++ you cant learn C++ without learning a little C.
Absolutly righ. They made a mistake by making C++ to be compatible with C. The result is that half object-oriented badly designed language. Java designers corrected this mistake by making the Java very clean and pure object oriented and that end up to be incredibly well designed language.
Last edited by moeminhtun; 10-29-2003 at 11:37 PM.
I Think that the main problem that occurred with C++ was that it came about as a language, but there were no standards of how to use it. Java on the otherhand came in to being with standards of how it is is to be used. Good C++ coders can design apps that are just as object oriented as Java code but, it isnt a requirement by any standards to do so.
Then, there were different vendors supplying different proprietary class libraries (STL, MFC, Roguewave, Home rolled, Database access libraries, etc) , in an attempt to compensate for the deficiencies in the language and the lack of standards...
I wouldnt spend any time learning C, unless I planned on doing lowlevel coding, at the OS Level, or Embedded systems development where memory is very limited.
There are actually some text for teaching C++ which does not introduce procedural programming (at least one text anyway). I don't know its name, but I remember reading that a university was using it as course material for newbs and according to the article, it was a successful approach at getting the students to enter the OO paradigm. I makes good sense to me, if you can structure your text well and introduce the concepts in a well thought out manner with out getting to complex up front.
I wish I could remember the text's name...
But I do agree that learning C++ first would be to your benefit, but generally in doing so, you will be exposed to some C (many texts I've seen often have contrasts to C )
Location: At a tea party with Alice in Wonderland.
Distribution: Fedora 7
Posts: 65
Rep:
Personally, I learned java first. Then I picked up some C++. Though I haven't done much programming in it , the migration was fairly painless. I've looked at C as well, and to me, C++ is easier than C.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.