LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Do you really need to learn C before C++? (http://www.linuxquestions.org/questions/programming-9/do-you-really-need-to-learn-c-before-c-108384/)

qcoder 10-25-2003 12:26 PM

Do you really need 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++.

speter 10-25-2003 01:55 PM

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#.

Steve

megaspaz 10-25-2003 01:59 PM

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.

coolman0stress 10-25-2003 02:21 PM

It depends on your interests, but no, technically you don't need to know any C before doing C++

Tinkster 10-25-2003 02:57 PM

Actually, I'd say that learning the procedural
C before the object-oriented C++ is an obstacle ;)

The fact that they have many common keywords
and share constructs like tests and loops doesn't
mean that one has to know the older one first.

Cheers,
Tink

worldmagic 10-25-2003 03:06 PM

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 ;-)

Tinkster 10-25-2003 07:42 PM

Quote:

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 ;-)
/me high-fives worldmagic ...

Cheers,
Tink

rufius 10-26-2003 12:00 AM

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.

HappyDude 10-26-2003 10:07 AM

I'm not so good at C++ (I stink) but I didn't learn C first. I learned Perl.

oopicmaster 10-29-2003 10:27 PM

Because of the mistakes made by the designers of C++ you cant learn C++ without learning a little C.

moeminhtun 10-29-2003 11:22 PM

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.

moeminhtun 10-29-2003 11:29 PM

Quote:

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.

oopicmaster 10-30-2003 12:11 AM

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.

mr_segfault 10-30-2003 06:11 AM

moeminhtun & others,

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 )

Cheers..

Starchild 10-30-2003 01:31 PM

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.

So, no, you don't need to learn C before C++.


All times are GMT -5. The time now is 11:49 AM.