A possibly more ergonomic syntax for borrow

To be honest, the &mut syntax doesn’t share much in common with C++. I wouldn’t even go as far to say anyone familiar with C++ has a much less steep learning curve with the ownership rules. C++ has more in common with Rust’s unsafe raw pointers, which are probably best avoided for the same reasons. The borrow operator only looks like the address-of operator on the surface.

More on-topic, I am going to side with a lot of the commenters from the other recent thread that asked about syntax changes; Rust and Data Science // First impressions from an outsider

In short, minor changes like this generally don’t “move the needle forward” in language design. But they would carry high risk of extra tech debt and instability (breaking changes). A lot of syntactic pieces of a language are “learn once, use often”. And even more contentious is that bikeshedding on exactly how syntax should be changed will always be subjective and highly debatable.

3 Likes