r/AskProgramming • • 8d ago

Career/Edu C++ vs python

I'm a first year cs student and I'm wondering which is better for getting a job. I know it's more about your skills and not only the programming language but they do have different niches that they excel in.

The reason I'm asking is that I already know Python and have done extensive work in it. But I recently discovered C++ and truth be told I really like it and prefer it over Python. C++ just has so much more control and logic that you can manipulate in it. It feels more concrete for some reason.

Either way, I know learning Python is essential cuz it's the fastest way to get things done. But at the same time it's also the most popular language, so I'm wondering will learning C++ be worthwhile?

3 Upvotes

22 comments sorted by

View all comments

2

u/EngineersUniverse 8d ago

if you already know Python and actually enjoy C++, I’d say go for it. Cpp teaches you stuff about memory, performance and how computers actually work that Python tends to hide from you. Cpp is big in embedded systems, robotics, game engines, high-performance computing and finance. Python dominates in AI, automation and data science. honestly, you’re in your first year. Don’t worry too much about which language gets you hired. Get really good at programming, build some cool projects and learn how things work under the hood. For a practical path, I’d start with modern C++ basics, pointers, references, memory management and STL. Then move into data structures and algorithms, and actually implement them yourself instead of just grinding LeetCode. After that build 2-3 projects, maybe a CLI tool, simple HTTP server or a multithreaded application. Learn Git, CMake and basic debugging with GDB along the way. check out learncpp.com, it’s free and very solid. knowing both is a great combo. if you genuinely enjoy C++, that’s even more reason to stick with it. don’t get stuck watching tutorials forever, build stuff and break things.

2

u/ElephantOdd5341 8d ago

I already know git and I've used Python for multithreading and qiskit.

Another reason I want to know C++ is coz even for AI the background work is mostly done by C++ and it works in most of the things at the bottom. Also I kind of detest frontend

1

u/max123246 8d ago

Actually in the AI world I would say C++ isn't the majority anymore. The new hotness is GPU dsls such as triton, cutedsl, cutile, and mojo. Cutedsl and cutile for example is in python, actually, though it won't look like normal python at all. And mojo is python -like. Of course pytorch is a python framework for ML research, not writing gpu kernels

If you want to get into GPU programming, cuda c++ is a good place to start to learn SIMT style kernels for HPC type of workloads but you'll want to get into tensor core programming using tile based programming languages for any ai workloads