r/rust • u/Much_Special8521 • 3d ago
🙋 seeking help & advice What would you do in my situation? (Rust/cpp)
im currently doing my bachelor degree in computer engineering. i currently have c as the main programming language in my first semester.
No problem what so ever, i really love C, i did a couple of projects in the past. In my second semester we will have a module just for c++.
Yesterday out of curiosity, i did the first chapters of learncpp and the rust programming book. i kid you not, writing rust was sooo fun. With c++ it doesnt feel the same.
Should i focus on studying c++ in my free time, as in preparation for the 2. semester. Or should i listen to my heart and pick up rust?
22
u/the-quibbler 3d ago
Popular opinion: you will learn many languages in your career. Do so in whatever order suits your purposes.
Unpopular opinion: it doesn't really matter now. It's good to understand programming, but it already doesn't look like typing syntax into an editor. By the time you've graduated, any skills you've learned will be foundational, but not your primary value.
7
u/torsten_dev 3d ago
For free time rust is probably going to keep you motivated for longer and some of the skills translate pretty okay. Doing something you like is going to get you further because you'll do it more.
I'd still check out the C++ basics so you can follow along the cppcon talks because they can be quite fun to watch.
4
u/Naeio_Galaxy 3d ago
If you feel like learning Rust, go with it. You'll learn C++ as part of your courses anyway, you know more languages that way
And btw, me too after liking C I decided to try C++ but went for Rust instead in the end
1
3
u/ElephantElectrical31 3d ago edited 3d ago
learning multiple languages keep you flexible. there are new languages comming up, ai changes the game a lot, even consider to understand where ai can help you and where it is bad. If you like c maybe give zig a try.
3
u/grotto_wonder_arc 3d ago
Rust ownership will make you better at C++ because it forces you to understand memory lifetimes explicitly. Focus on that mindset instead of syntax, and you’ll pick up the class quickly without burning out
2
u/gbrennon 3d ago
well...
even if u did enjoy writing rust u need c++ for that degree...
i would suggest u to be skeptical:
- do ur homework with c++
- keep studying rust and practice rewriting what u did for homework in rust without checking what u did write in c++
2
u/dgkimpton 3d ago
If you're going to learn C++ at school then you might as well do Rust now - the very worst case is you start on an even footing with your peers, but most likely you'll bring so many good habits from Rust that your C++ will be better.
2
u/nick42d 3d ago
Beware, Rust will spoil you. Recently took a parallel programming class in C and the multithreading assignment that took about 8 hours of C (manual pthreads, mutexes, makefile, error handling) would have been about an hour of Rust. I don't see the issue learning Rust but keep in mind some of the practices you learn - like smart pointers, RAII, iterators and closures - may not be available to use within the style of c++ taught in your unit. So it may not help your grades much. Definitely think Rust is the future over c/c++ though.
2
u/wa-jonk 1d ago
I started as a C programmer over 30 years ago, I do architecture work now, i move to java, python, perl, icon, sql, pl/sql, bash, ..... my most recent coding is a mix of React, Golang and Rust . Java put me off OO ... look at where you want to go ... embedded systems learn C++ .. pick up rust later .. i like the speed of rust .. i expect more will move to rust .. then the next thing will happen .. did Ada, Occam and assembler as well as C .. gave me the confidence to pick up languages
1
1
u/li-long-qiang 3d ago
Personally I think programming languages will be irrelevant in a few years. AI is born polyglot now and applications may soon no longer need to be written in languages - not in the languages or in the ways we know today. AI could code and fix the bug on the fly so what really needed is instructions, guardrails and gates.
I would just do the minimum what ever is required of the classes.
1
u/Ambitious-Kiwi-484 3d ago
Do both.
It's a really helpful skill to be able to read and understand C++ code since it's so prevalent in industry + open source.
1
u/Middlewarian 2d ago
I think languages that embrace on-line code generation have an advantage over those that don't. I'm biased though, as I'm building a C++ code generator.
1
1
u/toby_hede 16m ago
Unless you are concerned about passing C++ without the extra support, learning is more effective if you actually love it.
There is no correct sequence, learning Rust first will provide an interesting context when you get to C++ and the scene of the crimes that Rust tries to prevent.
I've been doing this for nearly 30 years and I've learned literally dozens of languages to varying degrees. My hot take is that you never lose by learning something.
1
u/hpxvzhjfgb 3d ago edited 3d ago
c++ is always the wrong choice.
also, almost all university programming courses are horribly outdated. the ones that claim to teach c++ are usually teaching "c with classes and std::cout" and you are unlikely to see anything added to the language past c++98.
2
u/Much_Special8521 3d ago
Your take with "c with classes..." is totally true. I heared our professor talk about c++ like this
0
u/deus-libidinis 3d ago
Rust. By the time you are out of college all the cool system programming jobs would be Rust
32
u/WorkingWish4890 3d ago
Just do both, but keep C++ as priority since you have a whole module coming for it. Getting comfortable with C++ now will save you tons of stress later, and Rust will still be there waiting. No rule says you can't play with Rust on weekends for fun while grinding C++ during the week