Reply to post: Re: Meh

Rust marks five years since its 1.0 release: The long and winding road actually works

DrXym Silver badge

Re: Meh

In what sense are these immutable variables not immutable? The value is bound to the variable and is read-only.

Borrowing is simply C++ style references with lifetime checks and to ensure that not more than one mutable reference exists at any given time. Yes it may drive someone nuts because C++ doesn't care if you pass around a reference to something that no longer exists whereas Rust really does. It is trying to protect you from bugs like use-after-free and data races. Most of the time it is implicit so it's not really a big deal.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2022