LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


View Poll Results: Is it a good idea to learn C before C++?
Yes, Learn C before C++ 23 26.44%
No, don't learn C before C++ 33 37.93%
It really doesn't Matter 31 35.63%
Voters: 87. You may not vote on this poll

Reply
  Search this Thread
Old 10-25-2003, 12:26 PM   #1
qcoder
Member
 
Registered: Oct 2003
Location: United States
Distribution: Debian
Posts: 65

Rep: Reputation: 15
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++.
 
Old 10-25-2003, 01:55 PM   #2
speter
Member
 
Registered: Sep 2003
Location: Edison, NJ
Distribution: Fedora, Mac OS X
Posts: 313

Rep: Reputation: 30
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
 
Old 10-25-2003, 01:59 PM   #3
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
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.
 
Old 10-25-2003, 02:21 PM   #4
coolman0stress
Member
 
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
It depends on your interests, but no, technically you don't need to know any C before doing C++
 
Old 10-25-2003, 02:57 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 10-25-2003, 03:06 PM   #6
worldmagic
Member
 
Registered: Oct 2003
Location: Europe/Sweden
Distribution: RedHat
Posts: 78

Rep: Reputation: 15
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 ;-)
 
Old 10-25-2003, 07:42 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 10-26-2003, 12:00 AM   #8
rufius
Member
 
Registered: Oct 2002
Location: Miami, FL
Distribution: Ubuntu
Posts: 184

Rep: Reputation: 30
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.
 
Old 10-26-2003, 10:07 AM   #9
HappyDude
Member
 
Registered: Jul 2003
Posts: 140

Rep: Reputation: 15
I'm not so good at C++ (I stink) but I didn't learn C first. I learned Perl.
 
Old 10-29-2003, 10:27 PM   #10
oopicmaster
Member
 
Registered: Sep 2003
Posts: 154

Rep: Reputation: 30
Because of the mistakes made by the designers of C++ you cant learn C++ without learning a little C.
 
Old 10-29-2003, 11:22 PM   #11
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
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.
 
Old 10-29-2003, 11:29 PM   #12
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
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.

Last edited by moeminhtun; 10-29-2003 at 11:37 PM.
 
Old 10-30-2003, 12:11 AM   #13
oopicmaster
Member
 
Registered: Sep 2003
Posts: 154

Rep: Reputation: 30
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.
 
Old 10-30-2003, 06:11 AM   #14
mr_segfault
Member
 
Registered: Oct 2003
Location: Australia
Distribution: Redhat 9
Posts: 95

Rep: Reputation: 15
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..
 
Old 10-30-2003, 01:31 PM   #15
Starchild
Member
 
Registered: Sep 2003
Location: At a tea party with Alice in Wonderland.
Distribution: Fedora 7
Posts: 65

Rep: Reputation: 15
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++.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The best way to learn? iz3r Programming 7 02-06-2005 11:00 PM
What should i get to learn? Any Solaris / OpenSolaris 1 02-18-2003 06:19 PM
I want to learn more ThorsHammer Linux - Newbie 2 11-07-2002 08:13 AM
I would like to learn how to do it tournesol Linux From Scratch 2 10-07-2002 10:07 PM
How to learn more? R2RO Linux - Software 5 08-31-2002 08:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration