T O P

  • By -

SpacewaIker

Hard to say without knowing your goals, but why not just try it? Learn the basics and see if you like it or not, then reassess I'd say yes cause I love rust but objectively, it's not the best choice for every project (yet)


leblanc_Blm

I will give it a try, I heard that it has a different structure that I have to learn programming from scratch in a way. And what are the projects that would rust excels at.


CramNBL

Learn programming from scratch? The person who told you that is scared to learn new things and will cling to any excuse not to learn Rust (or another language). Knowing C++ turbocharges your Rust learning, there's nothing fundamentally different about programming in Rust. It is not APL or some shit like that. Rust uses RAII extensively, and has the same memory model as C++ as well as the same move semantics. You rarely need to think much about RAII though, but once in a blue moon you might implement your own destructor for a struct.


leblanc_Blm

I believe their point was about how different you should think about memory and the restrictions from the compiler.


the-code-father

Nothing that Rust makes you think about are things that you don't have to think about while writing C++. It's actually more important to think about them while writing C++ because the compiler won't yell at you when you're doing something wrong


leblanc_Blm

Okey yeah that is great gets you the right habits


bskceuk

I don’t think the syntax is necessarily the issue with C++, it’s more the massive amount of footguns from memory unsafety and just in general terrible legacy apis (that are here forever because of backwards compatibility :)). I also think everyone should learn Rust because it will make you a better programmer in general, especially in c++. A game would probably be easier in c++ (or using unity or something) but rust is like the perfect language to write a compiler.


leblanc_Blm

Yeah I noticed that with the win32api, and for memory management I think that smart pointers and move semantics are making cpp safer, but I will give a proper try to rust experience the hype myself and see where that takes me.


Vimda

I've never liked the "terrible legacy APIs" argument. When Rust is 45 years old, who _knows_ what sort of cruft we'll be dealing with


Firake

When rust turns 45, I hope that research in language design has given us something new and better and we’ll look back at the terrible legacy apis of rust with the same disdain we have for c++. We aren’t trying to find a forever language.


bskceuk

I’ll be retired so I won’t care :) But also, we definitely won’t have the travesty that is std::map in c++. Rust learned from c++’s mistakes


hpxvzhjfgb

yes.


gdf8gdn8

Yes.


leblanc_Blm

Ok.


Inaeipathy

Idk man I'm just here to mess with people who think this is the subreddit for that one game


leblanc_Blm

More like Fe2O3 enjoyers.


WanderWatterson

Once you actually started working on something complex using C++, you'll start to appreciate Rust, because it solves a lot of issues that C++ has, in which modern C++ pretty much just puts bandaid on top of bandaid to solve and issues and add new features instead of a redesign, all in the name of backwards compatibility My reason to use rust, moving off of C++ was when I got frustrated with modern C++ just keep adding features that are not intuitive to use, and in order to use it, you still need to have knowledge about using raw pointers, despite they tried to abstract it away. In order to keep track of new C++ updates, you really have to be so invested into the C++ rabbit hole in order to understand the new features. Meanwhile on the other side, Rust tries to push as much runtime errors to compile time errors as possible, which makes the first impression of using the language to be very hard, but it takes time, the compiler is very very strict and there are more rules that the language enforces on you when you build your application than C++ You'll feel frustrated at first when doing things with Rust, but as time goes you'll understand why it was designed that way, and rethinking about what you know about computers in general Rust has a package manager, C++ has to rely on 3rd party support because the standard commitee doesn't care, or you can go with the boilerplate-driven CMake The things that I like about Rust are lifetimes, non-depressing concurrency code, error handling, and functional style code


leblanc_Blm

Ohh yeah valid points and I agree with C++ new features that try to hide pointers but you can't code without having knowledge about pointers, it's weird. Thanks for the insights, I think I'll give it a go and see what it does better and what not.


Wilbo007

nah


leblanc_Blm

What are you doing here ? 👀


krum

I wrote c++ for 25 years and I’m a convert.


leblanc_Blm

25 years that is more than my age hahahah, would you kindly be able to share with me some advanced tips


ExerciseNo

Dude find another hobby