C, Python...or...?

Hey everyone,

My question is whether I should take up C / C++, or Python or even a different language altogether.

The question is meaningless without context of course...a little background about me / my goals and plans.

I do have a solid programming background of sorts; albeit in the web development industry. Developing in PHP for 6+ years, and currently working on an open source framework for PHP ( http://kwfusion.com if you happen to know anyone who may be interested ).

My goals / plans that necessitate moving on from PHP?

Well, first and foremost, I love the open source community...I'd love to help out and give back to the community that has given me so much over the years. One thing I'd like to do is contribute to Linux kernel maintenance / development. I'd also like to write some hardware drivers for *nix (even to this day, there are too many driver issues going on).
Other than that, I'd like to just create various free software. One thing in particular I'd like to look into is creating extensions for PHP (which are done in C).

I'm leaning towards C, since I would imagine that is the best tool for writing drivers (I know that a lot of Linux drivers, services and routines are programmed in Python, but that seems odd to me), and it's mandatory for the PHP extensions and Linux kernel.

Any thoughts, observations, hate mail, etc is greatly appreciated!
Linux kernel maintenance / development
C
hardware drivers for *nix
C
various free software
Any language
extensions for PHP (which are done in C)
C

Sounds like you want to learn C.
Edit: I understand other languages can be and and are used for these things, but I'd be amazed if C isn't the dominant language.
Last edited on
My advice would simply be to pick one and get started. If you are interested in writing drivers, then pick C and start learning. Your needs and interests should dictate the language choice.
Last edited on
Sounds like C it is.

I'm afraid I might be opening a can of worms here, but something else also crossed my mind....if I'm going to make the commitment to learning C, would it be wise to just bypass C and go straight to C++? From what I understand, all C code is valid C++ anyway...but obviously it can't be that simple, otherwise C would have died a long time ago.
Your right, it isn't. C is generally slightly more efficient than C++ for some kinds of programming, especially memory constrained. Another is that the C ABI is standardized, so that a C library will link to a C executable, even if the library and executable are compiled by different compilers or different versions of the compiler (so long as its for the same target platform). Also, a C compiler is the standard compiler for an embedded platform, whereas most won't have a C++ compiler (or even if they do, not the standard library).

Also, not all C code is valid C++. All of C89 is, most of C99, and not much of C11 is compatible with the later C++ standards (as far as I know). However, that is probably a good thing that they are separating - C++ and C are very different to program in.
Last edited on
C ABI is not standardized, it just so happens to be the same in most implementations.
I stand corrected.
I wanna ask: why is Python popular at all? I'm intermediate in C++ and I started doing a Coursera course on Python merely for fun. Python looks to me like a language for kindergarten students, as if someone decided to simplify it as he only could. I realize that Python probably can do everything other languages can, but why is it popular now?

PS I'm happy that I now C++ (to some extent). I think it's the coolest language ever.
You kind of answered your own question: It's very simple to use. That's the design goal of the language. Lots of built-in functionality and it integrates nicely with other languages. It can, and has been, be used for large projects as well.
Yeah, you're right. I wasn't sure that it could be used for large projects.

Is C/C++ still in the game?
Of course. I can't seem them going anywhere anytime soon. I really don't see C every going anywhere.
alekscooper wrote:
Is C/C++ still in the game?

As ResidentBiscuit pointed out, in a word? Yes!

Allegro is written in C, SDL is written in C, SFML is written in C++. There are lists you can find that tells what games, software, engines, etc that are written in each language.
If I had to wild guess, every AAA game engine is going to be written in C++.
Yeah, I think that is a safe bet, too.
There often bindings to higher level languages such as python while implemented in C or C++ (more C++ now adays).
Topic archived. No new replies allowed.