Click to See Complete Forum and Search --> : Is C++ really worth the hassle of learning?
sporko
05-19-2003, 04:26 PM
Hey guys i was wondering if it would be a good idea for me to learn C++ or if another language might be more useful. TO give a little bit of background info I know Perl and PHP which i guess could be concidered as very light programming languages. I have heard that Java might be a better choice to learn and that it can do just about everything C++ can and a lot easier. Is this true?
Thanks in Advance,
Sporko
goon12
05-19-2003, 06:13 PM
This might sound a bit vague, but.. It all depends on what you plan to do with it.
Antibiotic
05-19-2003, 06:23 PM
goon's right, everything depends on what are your intensions. If you want maximum freedom and speed, learn C/C++, if you want robust development and a car with handbrake always pumped on, then learn Java.
My reasoning (one of them ) to learn C ( I prefer pure C to C++) is that I'm mainly deveoping for microcontroller embedded systems, so everything there is compiled with pure assembly or C language. Another reason for me is that all native linux apps are written in C, so it is a huge asset to know it.
bwkaz
05-19-2003, 07:15 PM
Originally posted by Antibiotic
all native linux apps are written in C, so it is a huge asset to know it. :confused:
Mozilla is a Linux-native program, and it's C++. So are OpenOffice, AbiWord, and heck, Qt and KDE, for that matter, even though Qt is just a library and not a full-fledged program.
The kernel is written in C, and many of the userspace tools (well... the CLI ones anyway) are written in C, but that's because they're small tools (or performance is an absolute must, in the case of the kernel).
Perhaps I misunderstand what you mean by "Linux-native"?
sporko
05-19-2003, 08:10 PM
I think C might be a good choice for me then mabye later move to C++. If anyone has any place that they know of to learn C for free i would greatly appreciate it. If its possible id like to avoid spending $50+ on a book.
zdude255
05-19-2003, 08:23 PM
Originally posted by bwkaz
:confused:
Mozilla is a Linux-native program, and it's C++. So are OpenOffice, AbiWord, and heck, Qt and KDE, for that matter, even though Qt is just a library and not a full-fledged program.
The kernel is written in C, and many of the userspace tools (well... the CLI ones anyway) are written in C, but that's because they're small tools (or performance is an absolute must, in the case of the kernel).
Perhaps I misunderstand what you mean by "Linux-native"?
What he meant is that most linux apps are written in C over C++. In the Linux world people generally prefer C to C++
C is a great choice. It won't hurt to learn C and Java at the same time. I know both languages, I use C for graphics and games, and I use Java for any algoritmical stuff. (Especially in programming competitions)
Antibiotic
05-19-2003, 09:52 PM
zdude: thanks man, someone to back me up :D
bwkaz: you can call it a typo, I know that most big programs are written in C++ because you cant do much in that aspect without OOP and class ideology.
sporko: if you want a head-on start with C, I would suggest Kernigan & Ritchie "ANSI C". This is by far the best book on ANSI C I've seen. _May_ _not_ be very friendly, but its one of my personal preferences. You can get some "Starting with C"-type books from the net, just in case that book is too much for you. I dont think that'll be an issue tho.
mage492
05-19-2003, 10:11 PM
As has been said, it depends on what you want to do. Want to do web-related stuff? Learn PHP. It's a really cool language that is very much like C. First laguage? Something like BASIC (do as I say, here, not as I did).
The biggest thing is that knowing any language gives you a head start learning another. IMHO, C++ is a difficult language to have as your first. It was my first, and it was extremely difficult. As a second or third, though, it would have definitely been easier. Do you have any experience with programming? If not, I recommend BASIC.
SolKarma
05-20-2003, 05:19 AM
C++ is a low-level programming language that makes use of a class-based inheritance paradigm (proven inadequate for large-scale applications) layered on top of the C programming language, which is a macro-assembly language. This design makes C++ language complicated, not complex.
The language is suitable for systems-level programming, e.g., writing kernels, hardware drivers, etc. Mostly, though, people use C++ for projects like GUI-based user-level programs, which is the domain of high-level applications.
Essentially, C++ is popular because of Microsoft and it's Visual C++ tools. If you're in need of a programming language to write systems-level programs, good choices are the low-level programming language C, in which you can practice the object-oriented programming paradigm, or Modula-3, which is an object-oriented programming language.
Python, which is a "sometimes" high-level language, straddles the fence between C++ and higher-level languages like Io. Python is a superior choice to languages like C++ or Java (which is a psuedo-proprietary C++ clone, with garbage collection) if you plan to engage in high-level like programming.
The correct levels of abstraction place C as the language to build abstract data structures and Io as the language to use and manipulate objects.
Io (http://iolanguage.com)