Would it be of interest to learn C or C++ if one already know python? I'm a linux and programming enthusiast (i.e hobbyist ;-) ) and C is pretty common on linux and many other applications. But is it worthwhile learning C if I already know python? What are the advantages C has over python?

Recommended Answers

All 9 Replies

IMO phthon is a toy that non-programmer hobbyists use, in the same category as Quick Basic. C/C++ is used by professional programmers to write real professional programs.

commented: fail -1

>But is it worthwhile learning C if I already know python?
Personally I think everyone can benefit from learning C, but your question suggests that you don't see any point in it. If you're a hobbyist, don't force yourself to learn something you don't really want to.

It's not that I don't see a point in it.. I just want to know where it will have advantages.. (it certainly appears useful.)
And as for python being a toy, I don't think that's fair. A significant part of modern linux distros are built on python. (Ubuntu)

>I just want to know where it will have advantages.
So much for the pioneering spirit of hackers and hobbyists... :icon_rolleyes:

>I just want to know where it will have advantages.
So much for the pioneering spirit of hackers and hobbyists... :icon_rolleyes:

OH come ON! There's no point in learning an language if you don't see the point.. hobbyist or not. That's why I posted this thread.

>There's no point in learning an language if you don't see the point.. hobbyist or not.
That's true. Though "the point" doesn't need to be any kind of advantage, which is what you're looking for. "The point" could be as simple as the code looking cool and sparking your interest. That's what I mean by a pioneering spirit. If you only look for advantages and disadvantages, you're likely to miss something amazing.

>That's why I posted this thread.
Do you want to know why I first decided to learn C? The -> operator looked neat. Completely pointless, and I didn't care about advantages or how C differed from the language I already knew (COBOL). But that arbitrary and irrational decision turned out to be a huge changing point in my life. I know for a fact that if I had worried about whether it was worthwhile, I wouldn't have chosen C.

Well, here is a bit of my experience.

I worked in a genetics lab where I basically wrote scripts to parse genomes and the output of programs that analyzed these genomes to automate many tasks, basically a lot of string manipulation, very complicated string manipulation. Using nothing but Python I was extremely successful, my programs handled huge workloads and not once did I feel a need to learn C, Python was great and is definitely not just for hobbyists.

Some time later I'm somewhere else and I have to make a program to examine several records of data, each taken over about 90 minutes at about 20kHz. I wrote a python script and it took about an hour just to finish one file, so I switched over to C and that sped things up to a few minutes. Although Python has a C API so I could write the computationally expensive parts in C(Con: It's a pretty intimidating API) and everything else in Python, so I still stand by Python.

Seeing as how you call yourself a hobbyist I don't imagine that you would need to be using C any time soon, although I don't recommend not learning it.

>There's no point in learning an language if you don't see the point.. hobbyist or not.
That's true. Though "the point" doesn't need to be any kind of advantage, which is what you're looking for. "The point" could be as simple as the code looking cool and sparking your interest. That's what I mean by a pioneering spirit. If you only look for advantages and disadvantages, you're likely to miss something amazing.

>That's why I posted this thread.
Do you want to know why I first decided to learn C? The -> operator looked neat. Completely pointless, and I didn't care about advantages or how C differed from the language I already knew (COBOL). But that arbitrary and irrational decision turned out to be a huge changing point in my life. I know for a fact that if I had worried about whether it was worthwhile, I wouldn't have chosen C.

Point taken.. .you do make quite a good case .. ;-)..
BTW.. look at the previous post. Python IS useful atleast some of the time..

>BTW.. look at the previous post. Python IS useful atleast some of the time..
I'm not the one you need to convince. You quoted me, but Ancient Dragon is the one who claimed Python was a toy (which, for the record, I disagree with). Python is an excellent language and I use it on a regular basis both for personal and professional projects. However, if I need C or for something, Python just doesn't cut it. So your original question is still baffling because I don't use the two interchangeably. I use the best tool for the job.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.