r/AskProgramming • u/Alone_End5987 • Oct 10 '26
Other Should I learn Rust or C++ as a beginner?
So I'm a beginner programmer, I've dabbled in it for a bit, tried many languages over the years but got stuck in tutorial hell every time and quit. I want to be serious this time around.
I'm strictly a FOR-FUN hobbyist, interested in Emulator dev, Graphics/Physics engine dev, and Low Level stuff like writing an OS. So which of these languages is better for me to learn?
I keep being warned that C++ gives you such a faulty sense of freedom that you can get to a point where you can spend months searching for a single faulty line to fix a bug because you made some tiny inconspicuous error (which Rust supposedly helps prevent). That sounds like....hell.
Yet I still see everyone using it. Is it really that bad?
6
u/JGhostThing Oct 10 '26
I would suggest learning C first and getting *good* at it before even thinking about another language.
4
u/Several_Version4298 Oct 10 '26 edited Oct 10 '26
There is no such thing as tutorial hell, it's just procrastination. Look up what you need to learn in the tutorial then just write the code and make it work.
If you haven't stuck at Python then that is good language for a beginner. C which is used for OS and engines and embedded code, is the base of C++. and will teach you what you code is really doing, or Golang are easier for beginners.
5
u/HouseOfWyrd Oct 10 '26
As a beginner?
Neither imo, but of those two Rust.
3
u/Substantial-Swan7065 Oct 10 '26
Neither. You will hate you’re life and programming
2
u/Uncleranny Oct 10 '26
no
2
u/jibbit Oct 10 '26
the two worst possible choices
10
u/kitsnet Oct 10 '26
Python.
Neither Rust nor C++ would help you here.
7
u/CS_70 Oct 10 '26
If you want to get that road, start with C. The holy grail of programming languages imho.
1
u/VagueHorizon_ Oct 10 '26
C++ is super set of C, so it gives complete control over handling memory. It isn't something to get scare from, some people like complete control. RUST prevents those memory errors and won't let them reach compilation.
For your low level and embedded path, both C++ and RUST are excellent choices. If you don't like errors then go for RUST but then you wouldn't be able to get complete benefits of OOP principles. C++ is made for OOP, but it comes with handling everything on your own. OOP is just a small factor where I differentiate them. RUST on the other side give some sense of OOP through 'structs' but it is safe.
there are other factors through which you can differentiate them.
Anyways, it totally depends on you which type of system and programming sense you want, both C++ and RUST are capable of doing what you want to achieve.
I will suggest C++ only because you have learned other languages (as you mentioned).
If you have no idea how memory safety works or coming from Python or JavaScript background and not intending to focus on it, then absolutely go for RUST, you will love it.
1
u/rew150 Oct 11 '26
either C or python not Rust or C++
3
u/arllt89 Oct 10 '26
2 languages I always advise:
5
u/CauliflowerDue3339 Oct 10 '26
Having worked in industry as a C++ dev for a few years, I’ve never seen anyone “look for an inconspicuous LOC for months”. Modern C++ is much safer than C++99 was in that respect.
I personally think C is the best for a beginner, as it gives you an understanding of what’s actually happening that translates well to most others. That said, from what I’ve heard Rust is generally preferred to C++ by the community. C++ is an absolutely enormous language which can be quite overwhelming.
1
u/CappuccinoCodes Oct 10 '26
"I want to be serious this time around." "I'm strictly a FOR-FUN hobbyist". Huh?
1
u/VancouverVentilator Oct 10 '26
NOTE! READ THIS! Please do not choose rust as your first systems language. PLEASE get a grip for a C style language first. It's much much much easier to transition to Rust after familiarity with C++ - Rust is entirely filled with unintuitive patterns that will trip you up. Heed my advice brother, I'm extremely certain that learning Rust second is ideal. In response to this, crustaceans will surely argue "It doesn't matter which you learn first, all that matters is your willingness to learn". This is utter bull - you can learn anything you put the effort and reps into, but you will undoubtedly be learning for far longer if your icebreaker is Rust. Good luck.
1
u/OrganicPause6530 Oct 11 '26
Neither, python is better tbh.
But from these two Rust, but it depends mostly on what you want to achieve with programming.
2
u/BeginningPea5674 Oct 10 '26
just learn golang first
1
u/Familiar9709 Oct 10 '26
C++ of course. Or C.
1
u/Boot_Burner Oct 10 '26
I’m currently taking an Intro to C++ course. Not necessarily by choice but because I’m pursuing a certificate that requires it in order to then take a SQL course (don’t ask me why I don’t run the department or make these decisions).
Before this class I had basically zero programming knowledge or experience but I do have a bachelors in hard science and a decade of experience in my previous field. So far I’ve enjoyed learning C++ as a conduit to programming concepts generally. Because I have no reference point with Python or whatever else, I don’t find it “hard” per se but I do see how it would get tedious and it doesn’t exactly feel super modern.
If you are hoping to be a life long programmer with a career in industry you should probably learn a little C++ but overall find a more modern language to become proficient in. Ultimately, a lot of this will be reduced to AI so knowing the foundations of any language would be useful. I have friends working at AI companies who have told me they went from writing code every day of every week to just managing 5 different Claude tabs in the span of a year or two. So keep that in mind. Learn the rules before you break them.
1
u/FirstTimeGamingTV Oct 10 '26
C++ probably, it’s what’s taught in schools at first because if you can understand C/C++ understanding the rest of the languages is pretty easy.
Rust is nice and very useful for what it’s good for, but you won’t benefit much from Rust over C++ as a beginner, and C++ can help you learn most concepts in cs.
1
u/darkwyrm42 Oct 10 '26
Zig?
1
u/PixelPacker Oct 10 '26
Unless you’re planning to be super serious about making a career of it’s probably best to avoid both.
Rust has designs that you won’t find in any other language and C/C++ will make learning the basics a lot harder.
I personally believe learning an easy language first and then moving to C is an easier pathway
1
u/KC918273645 Oct 11 '26
Rust makes you cry. C++ is better for beginner from those two. If if you're really a beginner, then I suggest something simpler first, for example C. Then when you get some experience with that, look at other languages. And don't follow stupid tutorials. Buy an actual book.
1
u/levyi123 Oct 11 '26
I would suggest C first.
Write simple programs and inspect them in https://godbolt.org/ to see how they translate to assembly.
Learn to read and understand basic assembly to really understand what's going on under the hood, this would get you to completely different level of understanding ;)
Once you can really understand some C code and how it roughly translate to instructions and how it's exectued, you can get into bit more "funny" stuff like C++ or rust :)
1
u/Distinct-Brief9643 Oct 14 '26
I think you should try rust but get familiar with programing with maybe an high lvl programing language like golang
Trust me I've tried rust A BEGINNER TUTORIAL I struggled so hard I rage quit coding wasent even fun tbh I don't like rust low lvl syntax I like high lvl syntax respond if you agree or something
1
u/Distinct-Brief9643 Oct 14 '26
If you really want c++ tell me how good you're doing?
1
u/Distinct-Brief9643 Oct 14 '26
Rust is also an safer more modern version of c++
1
u/Popular-Toe3698 Oct 15 '26
C++ is a complete pain but gives you more control and freedom. And I would absolutely suggest learning it BEFORE Rust.
1
u/AdCompetitive1256 Oct 15 '26
C++ is pretty much universal, is standardized, and has been around for a very long time. There are many C++ compilers and a ton of examples including open source software that you can learn from, even most embedded is programmed using C++. RUST is pretty new, a niche and a trend, and you know how it goes with trend.
That's just my personal opinion, though.
Ultimately, the choice is yours.
1
u/damster05 Oct 17 '26
The actual issue with C++ is the sheer complexity of the language. Many ways to do the same thing.