Has anyone else ever questioned the need for a dereferencing operator? Wouldn’t it make more sense the other way around, so we dereference on default and access or modify the reference with a set-pointer-to-operator?
Obviously, println! is able to deference automatically when I’m trying to print a reference of an integer like in the following example. I know that println! is a macro and some Show trait is implemented for this to work but nobody seems to have a problem with that (apart from me because I think its confusing). Why not use this everywhere else?
let mut x = 5;
let y = &mut x;
println!("y: {}", y);
*y += 10;
println!("y: {}", y);
Any thoughts on that?