Learning rust and from what I’ve learned so far I can guess why people wanna oxidize everything:
Memory is based on ownership. You try to copy a variable from another, the original gone unless you tell it otherwise
Everything will return a value whether you want to or not :v
Memory is based on ownership. You try to copy a variable from another, the original gone unless you tell it otherwise
Everything will return a value whether you want to or not :v
Comments
but i have to ask, how is that different from passing by reference? or does attempting to access the original variable throw exceptions?
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=bb2c2d38f549537d103dbf38ccbebba2
If you manage to go through the example I linked, you can make it compile by commenting out the last line.