Click to See Complete Forum and Search --> : Python or C++?


Sicnus
07-26-2001, 05:24 PM
should i learn c++ (orielly, and deitel books)

or python? (so far found a good orielly book)

and what can be done with python? iknow about c++ but not python.

MrNewbie
07-26-2001, 08:38 PM
I'd learn C++, but other people will probably tell you different, I just realized today how good C++ really is after I read the second chapter of Thinking in C++. It so far seems far easier than C if just because of the string class alone and even though it won't be as easy to learn as python, which I believe was written as a learning language, you'll probably find it more useful, even though again people here are going to disagree. :D

Ben Briggs
07-26-2001, 11:25 PM
Here's what I suggest; evaluate what you want to do. If you want to learn to program, learn Python. If you want to write quick programs, learn Python. If you want to write large, maintainable programs, learn Python. If you need your source to be portable, learn Python. If you like Object-Oriented Programming and the C syntax, learn Java (for how to use OOP correctly), then learn C++ (for speed). If you like OOP, but don't quite like the C family syntax, learn O'Caml; it's very fast (ranked #2 in a benchmark test (between C and C++)).

Before you choose, go to CCAE (http://www.codeexamples.org) and look at the language(s) you're interested in learning. If you can't understand simple programs in that language, you should bother learning it, try something different first.

BTW, if you do choose Python, I recommend the tutorial on Python.org (http://www.python.org). If you choose C++, go with Bruce Eckel's book, Thinking In C++ (http://www.mindview.net/Books) (Bruce rulez!)

Good luck in whatever you pick,
Ben "Ben Briggs" Briggs

[ 26 July 2001: Message edited by: Ben Briggs ]

Xprotocol
07-27-2001, 12:07 AM
Oh great, I know where this is going. This exact topic was discussed in a flame war a few weeks ago at http://www.linuxnewbie.org/cgi-bin/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=14&t=003266 . Please do a search before asking such common questions.

Sicnus
07-27-2001, 12:22 AM
Originally posted by Ben Briggs:
<STRONG>Here's what I suggest; evaluate what you want to do. If you want to learn to program, learn Python. If you want to write quick programs, learn Python. If you want to write large, maintainable programs, learn Python. If you need your source to be portable, learn Python. If you like Object-Oriented Programming and the C syntax, learn Java (for how to use OOP correctly), then learn C++ (for speed). If you like OOP, but don't quite like the C family syntax, learn O'Caml; it's very fast (ranked #2 in a benchmark test (between C and C++)).
[ 26 July 2001: Message edited by: Ben Briggs ]</STRONG>

ok yeah i am only 15 (don't laugh or flame!) and i am looking at maybe developing software, like games, or linux stuff, just developing, and programming, i have a very small basic knowledge of c++ and i read some of those scripts at that one site you told me to go and compaired it to python and of course python didn't make as much since. just i am still not sure what some of the terms are you used like " OOP " would that be like making software with gui's? so is python as powerful as c++? and platform capabilities mean like linux and win computers right? well thanks yall

sans-hubris
07-27-2001, 12:59 AM
Originally posted by Sicnus:
<STRONG>ok yeah i am only 15 (don't laugh or flame!) and i am looking at maybe developing software, like games, or linux stuff, just developing, and programming, i have a very small basic knowledge of c++ and i read some of those scripts at that one site you told me to go and compaired it to python and of course python didn't make as much since. just i am still not sure what some of the terms are you used like " OOP " would that be like making software with gui's? so is python as powerful as c++? and platform capabilities mean like linux and win computers right? well thanks yall</STRONG>Quite the initiate, are we? OOP=Object Oriented Programming. It's hard to describe what it is to a non-programmer, but I'll try. Before OOP, programming was done by describing the actions that the program must take. OOP came around and said that programs should describe the objects of the problem to be solved and what those objects can do.

Difference between C++ and Python: C++ is a compiled language, where has Python is a scripted language. This means that Python with often have a simpler (compared to C++) solution, but the solution may be slower. It also means that C++ is a lower level language, which means that C++ is closer to what the computer understands than Python. In fact, the program that was created to interpret Python scripts was written in C! (C++ is a derivative of C, FYI.)

I hope this helps.

kmj
07-27-2001, 08:40 AM
Xprotocol - Do you really consider that a flame war? All I saw was debate? Did my fragile ego make me subconciously overlook all the insults? because I saw none... If we can't be allowed to argue, well, then you've just taken away my joie de vivre.

jemfinch
07-27-2001, 09:13 AM
Originally posted by Xprotocol:
Oh great, I know where this is going. This exact topic was discussed in a flame war a few weeks ago

Believe you me, I had not yet begun to flame.

I flame very rarely (actually, we just got an example the other day in the "wtf? c++ ..." thread :)) and when I do, people know it :)

Jeremy

Sicnus
07-27-2001, 02:53 PM
thanks yall

just going to learn python and then c++. python for the programming expeirence and c++ for the path into great things....

Ben Briggs
07-27-2001, 03:23 PM
Originally posted by Sicnus:
<STRONG>ok yeah i am only 15 (don't laugh or flame!)</STRONG>

Please do me a favor; don't ever you that as an excuss :). I myself am 15, and I stated programming when I was 14. I know that I'm not the greatest Programmer ever, but I'm doing OK.

If you, or anyone else, puts your mind to it, you can learn to program Assembly :).

Keep chuggin' along, and you'll get there.

Ben

kmj
07-27-2001, 03:27 PM
Originally posted by Ben Briggs:
<STRONG>Please do me a favor; don't ever you that as an excuss :). </STRONG>

apparently, you can you it as an excuss for bad spelling, though. :p

Xprotocol
07-27-2001, 07:13 PM
Originally posted by kmj:
<STRONG>Xprotocol - Do you really consider that a flame war?.</STRONG>
Close enough :p. Its these repeated questions that leed to them though. Go into the general linux forum and ask weather Slackware or Debian is better. Common question but I can guaruntee it will cause a very nice burning.

GuruWannabe
07-27-2001, 08:59 PM
Originally posted by Sicnus:
<STRONG>should i learn c++ (orielly, and deitel books)

or python? (so far found a good orielly book)

and what can be done with python? iknow about c++ but not python.</STRONG>

You should not only learn c++ and python, but also perl and java.

Once you have a few languages under your belt, you'll know that programming is programming; it's just that each language has a slightly different way of doing things.

Learning more languages will also make you more flexible as a programmer.

Besides, how will you know which you like best unless you try a few?

jjjj
07-27-2001, 09:40 PM
Please do me a favor; don't ever you that as an excuss . I myself am 15, and I stated programming when I was 14. I know that I'm not the greatest Programmer ever, but I'm doing OK

How come everyone tells their age? Your age doesnt matter.

You should not only learn c++ and python, but also perl and java.



Screw it you should just learn 10 languages. Then see what one you like best.

Strike
07-27-2001, 09:47 PM
Originally posted by kmj:
<STRONG>apparently, you can you it as an excuss for bad spelling, though. :p</STRONG>

And what's your excuse for using "you can you" instead of "you can use"? :p

MandK_10
07-27-2001, 09:56 PM
The younger you are the easier it is to learn, anything. I wish I had continued working with programming. when I was 15 I started messing around with Basic on a commodore 64 with a friend. We got a pretty good start on a RPG simular to D&D. I never pursued it after that, then 15 years later I had to start learning C++. I wish I had been working with programming languages during those 15 years.

Start with anything structured and keep at it.

Mike

jemfinch
07-27-2001, 10:57 PM
Originally posted by larryliberty.java:
You should not only learn c++ and python, but also perl and java.

Once you have a few languages under your belt, you'll know that programming is programming; it's just that each language has a slightly different way of doing things.


First, let me state that I am all about learning new languages. I already know 4 programming languages myself. However, I do take issue with one eentsie-weentsie part of your post. The "slightly" part.

Learning a new programming language for the sake of learning a new programming language shouldn't be a simple, "Apply the programming concepts you already know to this new syntax" kind of thing. If you're going to learn new programming languages for the experience, then pick languages that stretch you. Pick languages that offer features and paradigms you've never used before. Pick languages that are so different from what you already know that you have to program them differently.

Sure, if you need a specific language for a job or for your resume, then learn it, but when you're just learning languages to learn programming or expand your horizons, don't pick languages that do things "slightly differently", pick languages that do things "very differently".

The above belief makes me take issue with your recommendation of programming languages. After learning C++, I doubt there's much to be gained by learning Java. After learning Python, I know there's very little to be gained from knowing Perl. If a person knew C++ and Python, I'd definitely suggest some sort of mostly-functional programming language as their next choice (perhaps, hmm, O'Caml? maybe LISP or Scheme, too :)) Java or Perl wouldn't expand that programmer's programming ability, it would only exercise their ability to learn a new syntax.


Learning more languages will also make you more flexible as a programmer.


Absolutely :) I'm glad some people recognize that :) I have a friend who won't learn anything new because he's so in love with Java (of all languages, Java!) and "can do anything he needs to do" in it. Of course he can do anything he needs to do, but he may not be doing it the easiest or best way.
[/QUOTE]

Jeremy

GuruWannabe
07-28-2001, 07:51 AM
There's nothing to be gained by learning Perl once you know Python...unless it turns out that you like Perl better, and how would you know unless you tried both?

Ben Briggs
07-28-2001, 10:45 AM
Originally posted by jjjj:
<STRONG>How come everyone tells their age? Your age doesnt matter.</STRONG>

This was exactly my point. I didn't want him to ever think "Maybe I'm just too young".

Anyone who has the interest can program, no matter what age.

jemfinch
07-28-2001, 04:40 PM
Originally posted by larryliberty.java:
there's nothing to be gained by learning Perl once you know Python...unless it turns out that you like Perl better, and how would you know unless you tried both?

Even if you did like Perl better, it certainly wouldn't be a gain :)

Jeremy

GuruWannabe
07-28-2001, 08:27 PM
Originally posted by jemfinch:
<STRONG>Even if you did like Perl better, it certainly wouldn't be a gain :)

Jeremy</STRONG>

I will readily agree with you that Python is better than Perl, but if someone tries both and likes Perl better, I still say it's a good thing. :p

At work you have to program in whatever they're using. You should program in whatever language you like best at home.

TacKat
07-29-2001, 05:53 PM
*cough* Assembly *cough*
:p

PimpHolic
07-29-2001, 08:43 PM
i wont say my age sincen you all dont like it..but im also interested in programming and i have read that python is a great language to start with, could anybody list some good python starting tutorials? im gonna check the one out on pyton.org but one usually isn't enough..thanks in advance