LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-30-2003, 08:42 PM   #16
coolman0stress
Member
 
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30

Quote:
Because of the mistakes made by the designers of C++ you cant learn C++ without learning a little C.
There is a reason why C++ is based on C.
 
Old 10-30-2003, 09:10 PM   #17
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
Yes. There's a reason. C++ was designed to be compatible with C to attract the C programmers to be able to migrate painlessly. This mainly for the marketing reason. But later, in software engineering point of view, this decision has been considered as a mistake. Ofcourse this is because software engineering only look at the technologies, not the business.

Last edited by moeminhtun; 10-30-2003 at 09:33 PM.
 
Old 10-31-2003, 03:22 AM   #18
nibbler
Member
 
Registered: Oct 2003
Location: Croatia
Distribution: Fedora 4
Posts: 46

Rep: Reputation: 15
I learned C, and so far I don't write big and complex programs, but I'm planning to learn C++ when I'll be doing more serious programs.
 
Old 10-31-2003, 05:53 AM   #19
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
Quote:
Originally posted by moeminhtun
Because real C++ means "class" and "objects" and it's a real complex object oriented programming which is not really appropriate for the beginners.
Such statements shouldnt be made. I learned OO before anything else through Java. To say it isnt appropirate for beginners isn't right. Any language is appropriate for anybody no matter the level. I'm of the belief that concepts should come before any specifig language:

algorithms and data structures.


if you can get those down, you can branch to OO or Structural and be fine and still learn the other later. I myself learned concepts 1st, then OO in Java and later took a class that used C (it didnt teach C, we used C...had to figure out a lot on your own).

If you know your basic programming concepts and how to code. I dont think learning one style before the other will make a difference. If you start out with C, you'll know C but you wont know learn anything OO related. If you start out with C++, you'll pick up a lot of what is in C, but I don't think learning C 1st will make your learning of Object Oriented programming any faster just because you recognize the syntax.


So i guess based off my last few statements, if you need to learn both in a hurry start with C++. If you need ot know C++, start with C++. I see no advantage to starting with C.
 
Old 10-31-2003, 08:06 AM   #20
ssobeht
Member
 
Registered: Oct 2003
Distribution: Debian Sarge
Posts: 207

Rep: Reputation: 30
Well, i still don't know neither C nor C++. I learned pascal when i was 11. I didn'r did so much on it but i used it to solve some genric maths problems and a few experiments and crazy things . I also learned then Basic an Visual Basic and a bit of Tcl/tk. Now (being 15) i'm starting to aproach Delphi (and spcially Kylix of course) to learn OOP. I got an introduction to it last year in a Java book i have witch i didn't finished(but i want to) and a bit in VB (but it's just Object based and it stinks). After learnig delphi i wanna try C++. I've got a book/tutorial around my bookcase.

well, this is the history of my life. I think that i'll learn C++ paralellaly to the C syntax.
 
Old 11-01-2003, 07:03 PM   #21
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
Have you seen the Unix Haters Handbook?
http://web.mit.edu/~simsong/www/ugh.pdf

The UNIX-HATERS Handbook
Published by
IDG Books Worldwide, Inc.
An International Data Group Company
155 Bovet Road, Suite 310
San Mateo, CA 94402 Copyright é 1994
by IDG Books Worldwide.
All rights reserved.

"In an announcement that has stunned the computer industry, Ken Thompson, Dennis Ritchie, and Brian Kernighan admitted that the Unix operating system and C programming language created by them is an elaborate April Fools prank kept alive for more than 20 years." ... "Then Dennis and Brian worked on a truly warped version of Pascal, called A. When we found others were actually trying to create real programs with A, we quickly added additional cryptic features and evolved into B, BCPL, and finally C. We stopped when we got a clean compile on the following syntax:

for(;P("\n"),R=;P("|"))for(e=C;e=P("_"+(*u++/ 8)%2))P("|"+(*u/4)%2);

To think that modern programmers would try to use a language that allowed such a statement was beyond our comprehension! We actually thought of selling this to the Soviets to set their computer science progress back 20 or more years. Imagine our surprise when AT&T and other U.S. corporations actually began trying to use Unix and C! It has taken them 20 years to develop enough expertise to generate even marginally useful applications using this 1960s technological parody, but we are impressed with the tenacity (if not common sense) of the general Unix and C programmer. In any event, Brian, Dennis, and I have been working exclusively in Lisp on the Apple Macintosh for the past few years and feel really guilty about the chaos, confusion, and truly bad programming that has resulted from our silly prank so long ago."
 
Old 11-02-2003, 02:58 PM   #22
maxsang
LQ Newbie
 
Registered: Sep 2003
Location: London, UK
Distribution: Red Hat 8
Posts: 1

Rep: Reputation: 0
As Stroustrup and most C++ experts are at pains to point out,
C++ is a *general purpose* language. You can write procedural
code (similar to C), OO code, generic code, or some combination
of the three. If you learn C++ properly, you will learn a lot about
programming in general. Programming in C will then become a
matter of absorbing the idioms, since you'll already know the
syntax. C is a low level language, which is its main weakness
(as well as its main strength ;-) C++ is much more flexible, powerful
and (unfortunately) will take longer to learn. But it's worth it. I would
recommend these web sites for improving your C++. Good luck and
have fun!

http://mindview.net/Books/TICPP/ThinkingInCPP2e.html
http://www.parashift.com/c++-faq-lite/
http://www.gotw.ca/gotw/index.htm
http://mindprod.com/unmain.html
http://www.cuj.com/
 
Old 11-28-2003, 07:23 AM   #23
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
I learned C++ before C. The HARDEST part about learning C after C++ is getting myself of object-oriented approaches and solutions to problems (imagine using object = (typecast *) malloc (sizeof(object)); versus object = new object();
 
Old 11-30-2003, 01:52 PM   #24
titanium_geek
Senior Member
 
Registered: May 2002
Location: Melbourne Australia
Distribution: it died/ macosx
Posts: 2,478

Rep: Reputation: 50
re UNIX hater's handbook:

LOL!!

A sign of the times, maybe? this year (2003-04) AP computer science exam is based on Java, not C++.
Therefore; am learning Java.

to ssobeht: if you're in a school that does AP exams/courses.. do Java. (there are two exams, do one each of the last two years of HighSchool. #1 11th grade, #2 12th grade)
I'm 16, by the way.

Oh: and what is C#?

titanium_geek
 
Old 11-30-2003, 02:00 PM   #25
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
C# is a language created by Microsoft as part of their .net initiative. It performs better than C# and it has all the nice OOP capabilities of C++ and Java and it allows the use of pointers (in an unsafe context).

I still don't agree that Java should be the quote=unquote "standard". Java has a lot of down falls, and it would be devastating to see such a slow redundant language become the "standard"
 
Old 11-30-2003, 02:09 PM   #26
titanium_geek
Senior Member
 
Registered: May 2002
Location: Melbourne Australia
Distribution: it died/ macosx
Posts: 2,478

Rep: Reputation: 50
Quote:
Originally posted by shassouneh

I still don't agree that Java should be the quote=unquote "standard". Java has a lot of down falls, and it would be devastating to see such a slow redundant language become the "standard"
well.. for beginers: yes. I like Java a lot, nice to learn.
And: we are living in an increasingly internet based culture, (we're here, arn't we?) and Java is secure, and nice looking for that basis. I wouldn't write say: an OS in Java (imagine that: would be portable[?]) but i would write a bunch of other stuff in Java. It's portable to other architectures without a recompile.

Oh: what downfalls?

titanium_geek
 
Old 11-30-2003, 02:31 PM   #27
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
downfalls like performance, performance, performance.

Also, there is this increasing trend of Java programmers to not know things that take place behind the scenes. It is my firm beleif that to be a good computer scientist u need to know how things work behind the scenes. Yes, this involves pointers, null, and lots and lots of diagrams and small boxes, LOL.

Many java programmers don't really know what's goign on behind the scenes so they are ata a HUGE disadvantage,.

Also the way I look at application programming is, If I worked so hard on some code, then gosh darn it I want an EXE file! Yes, the file could rely on an architecture like .net (like a C# executable) but I least i get a small reward of a semi-independant .exe file

Anywho, back to the subjetc of downfalls of java

I cannot begin to list all the downfalls of java. Like I mentioned earlier I have MANY bones to pick with Java. But two of the downfalls that come to mind are performance (large one) and the fact that things written in jhava suffer twice (once because java execution is slow, and once because everything is built on top of a slow platform).
 
Old 11-30-2003, 02:44 PM   #28
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Rep: Reputation: 30
It really doesn't matter which one you learn first but you might want to look into learning C instead of C++.A lot of people tell me C sucks and C++ is best but I find C is better.. thats just my opinion... I like it becuase you get more control over your program.. as for me I started learning C++ first and then I switched to C.. man that was hard... I had to unlearn the stuff I learned in C++ then learn C.. oh well.... next language for me is : Assembler.
 
Old 12-03-2003, 04:53 PM   #29
titanium_geek
Senior Member
 
Registered: May 2002
Location: Melbourne Australia
Distribution: it died/ macosx
Posts: 2,478

Rep: Reputation: 50
I'm not saying "Learn only java!"
I'm just saying I like it. Guess I'll have my opinion, you'll have yours.
I'm going to learn C++ or C, sometime in the future.
I'm learning java now so I can get college credit.

woohoo! mega progress in java today!

titanium_geek

Last edited by titanium_geek; 12-03-2003 at 04:56 PM.
 
Old 12-04-2003, 09:35 AM   #30
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
C first. It then makes C++ a doddle and theres no harm in knowing more than you need.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 07:28 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration