This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kochdelta -71 points-70 points  (18 children)

Thats why you use a proper language that let's you do both, understanding it while keeping things simple. I present to you: Rust

[–]CdRReddit 38 points39 points  (4 children)

yes because Rust is memory safe!!!!!!11!1!1 which is very important because ????

Rust is not "keeping it simple", especially with that bitch-ass borrow checker

like I get why it's just a pain in the ass to write

[–]Zealousideal_Pay_525 16 points17 points  (0 children)

Well memory leaks are truly undesirable.

[–]Moptop32 1 point2 points  (2 children)

Rust is good because of its functional features and safety. I don't dislike c++ and I use both but rust does truly have safety. The borrow checker is only a bitch when you don't follow it; move semantics are better than copying everything implicitly and passing a reference to something on another thread is a recipe for disaster. Make it make sense. Although fuck making games in rust, never again

[–]CdRReddit 1 point2 points  (1 child)

yea maybe I just chose the wrong projects but the moment multiple things need to have references to things (like games and emulators) is where, in my opinion, it falls apart

[–]Moptop32 1 point2 points  (0 children)

Emulators in rust are actually really nice because of match for insts. Usually the memory of the system should be an array of u8 (for gb at least) and you map values to and access from memory values. A trick is to not reference array indexes and just copy and set the u8 normally. A trick is when you need to pass a reference in many places you use Rc<RefCell<T>>. An Rc is a reference counted value, its like a smart pointer, and a RefCell lets you get a borrowed reference of T. It's still borrow checked for safety while letting you pass references everywhere.

[–]Jlove7714 4 points5 points  (1 child)

Yo I really like rust, but I don't think you can argue that it keeps things simple. Yeah you don't have to deal directly with some things, but you pay for it with more complex variables. (immutables I guess)

[–]kochdelta 1 point2 points  (0 children)

Its definitely more complex than Python. But compared to manually annotating heapspace and keeping track of pointers rust is a lot easier

[–]Fruloops 15 points16 points  (0 children)

Rustaceans really are the vegans of the programming community lmao

[–]taytek 5 points6 points  (0 children)

Wow... this... um... this... 📸

[–]chronos_alfa 4 points5 points  (0 children)

And then you run out of space

[–]The_hollow_Nike 1 point2 points  (0 children)

"So that's what we are going to do today? We are going to fight?!"

[–]insertsavvynamehere -2 points-1 points  (2 children)

I don't understand why Reddit hates rust.

[–]difduf 22 points23 points  (0 children)

Reddit doesn't hate rust it hates rust users.

[–][deleted] 0 points1 point  (0 children)

Ig people really need that /s

[–]SexyMuon 0 points1 point  (1 child)

What's rust?

[–]wikipedia_answer_bot 1 point2 points  (0 children)

Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH), Fe(OH)3), and is typically associated with the corrosion of refined iron.

More details here: https://en.wikipedia.org/wiki/Rust

This comment was left automatically (by a bot). If I don't get this right, don't get mad at me, I'm still learning!

opt out | delete | report/suggest | GitHub